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: