CloudFormation YAML: EC2 Instance with PowerShell UserData

Someone recently was asking for an AWS CloudFormation template, in YAML format as opposed to JSON, that would deploy an EC2 instance running Windows Server, and supported a PowerShell-based UserData script. In response to this, I created the YAML snippet below. Note that the Amazon Machine Image (AMI) ID is unique to the us-west-2 (Oregon) … Read moreCloudFormation YAML: EC2 Instance with PowerShell UserData

Import-DscResource Warning Message in WMF 5.0 April 2015 Preview

The latest version of the Microsoft Windows Management Framework (WMF) Core 5.0 package has some improvements to the PowerShell and Desired State Configuration (DSC) experience. One of those improvements is a warning message that will appear, if you do not use the Import-DscResource dynamic keyword to import the PSDesiredStateConfiguration module. The warning message appears when … Read moreImport-DscResource Warning Message in WMF 5.0 April 2015 Preview

PowerShell: Build Windows 10 Server Technical Preview VM in Azure

You’ve probably heard about Windows 10 and the Windows Server Technical Preview, right? You can download the Windows 10 Client operating system from https://insider.windows.com, and you can download the Windows Server Technical Preview from your MSDN account, if you have one. A lot of people have stated that the download of the ISO images is taking hours on their slower Internet connections, so what if I told you that you could get up and running with Windows 10 Server Technical Preview, in just a matter of minutes? Does that sound like a good thing to you?

Read morePowerShell: Build Windows 10 Server Technical Preview VM in Azure

Fix for Service Unavailable in PowerShell DSC Pull Server

Introduction

HTTP 503: Service Unavailable

I recently tried to setup a Microsoft Windows PowerShell Desired State Configuration (DSC) Pull Server, and was receiving an error from IIS. I used the xDscWebService DSC Resource, from the xPSDesiredStateConfiguration PowerShell module, to configure the DSC Pull Server. When I tried to browse to the IIS Web Service for the Pull Server, I was receiving a HTTP 503: Service Unavailable message from Internet Explorer. I believe it is important to note that the Microsoft Windows Azure Pack (WAP) is also installed on the same server where I am trying to deploy the DSC Pull Server.

Read moreFix for Service Unavailable in PowerShell DSC Pull Server

Use PowerShell DSC to Enable Screencast Recording on Azure VMs

Do you ever record screencasts, and post them to YouTube, or some other video sharing site? Well, maybe you do, maybe you don’t, but I sure do (when I find time)! For the sake of simplicity, I use an older, free Microsoft tool called Expresion Encoder 4.0 with Service Pack 2 (SP2). You can download it, again for free, from here! In some cases, it might be preferable to invoke screencast recording on a remote session, rather than recording on your local computer, however. In this post, we will take a look at how to use PowerShell Desired State Configuration (DSC) to automatically install Microsoft Expression Encoder 4.0 SP2 onto cloud-hosted Microsoft Azure Virtual Machines!

Unless you’re a MSDN subscriber, with access to Windows 8.1 VM images in Azure, most of your Azure Virtual Machines will be running some class of Windows Server. In this case, we’ll be using a Windows Server 2012 R2 VM. The first thing to point out is that Windows Server 2012 R2 requires the “Desktop-Experience” Windows Feature to be installed, in order to successfully run Microsoft Expression Encoder 4 SP2. If this Windows Feature isn’t installed, you’ll get a nasty error telling you that wmvcore.dll is missing, when you try to run the Expression Encoder program.

While working with Expression Encoder in Azure, one limitation you’ll want to keep in mind is that Expression Encoder has a problem rendering your screencast content inside the editor. So, if you want to make any modifications to your screencast, after you’ve recorded it, you’ll have to download the content locally onto your computer.

With all of that out of the way, let’s get DS-configuring! The first thing we need to do is ensure that the “Desktop-Experience” Windows Feature is installed. To do that, we will use the built-in WindowsFeature DSC resource. To start building our configuration, let’s use this code:

Read moreUse PowerShell DSC to Enable Screencast Recording on Azure VMs

PowerShell: Update-Help via Scheduled Task in Group Policy Preferences

Introduction

If you’re like me, you probably like to ensure that all your computers have PowerShell updatable help updated on a regular basis. You can achieve this using a variety of methods, but since Group Policy Preferences are available out of the box using Windows 7 and later, I figured it would be the perfect tool to keep PowerShell help up-to-date! The following guide will show you how to implement a Windows Scheduled Task to update PowerShell version 3.0 help on a regular basis.

The following operating systems include Group Policy Preferences Client Side Extensions (GPP-CSE) out of the box:

  • Windows 7
  • Windows 8
  • Windows Server 2008 R2
  • Windows Server 2012

You can also deploy the Windows Management Framework Core 3.0, and Group Policy Preferences Client Side Extensions to Windows Server 2008 non-R2 systems, however the equivalent client operating system, Windows Vista, does not support WMF 3.0.

Read morePowerShell: Update-Help via Scheduled Task in Group Policy Preferences

WMI Repository Corruption / SCCM Client Fix

You may have come across the following messages in the execmgr.log file on your SCCM clients: Failed to open to WMI namespace ‘.rootccmPolicyMachine’ (8007045b) Failed to ConnectSettings for ICcmPolicyAgent in CSoftDistPolicyNamespace::ConnectToNamespace Failed to ConnectToNamespace in CSoftDistPolicyNamespace::GetMachinePolicy Failed to connect to machine policy name space. 0x8007045b Failed to connect to user policy name space CSoftwareDistPolicyMgr::GetSWDistSiteSettings failed … Read moreWMI Repository Corruption / SCCM Client Fix