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: Add Users to Active Directory Group from Text File

A customer recently requested a PowerShell script, to add Active Directory users to a security group. The list of users would come from a text file that resides on the filesystem. To that end, I wrote a short PowerShell script that does just that, complete with parameter validation. #requires -version 4.0 #requires -Module ActiveDirectory param … Read morePowerShell: Add Users to Active Directory Group from Text File

Automating the Lync Client with PowerShell

You love PowerShell, right? And you love the Microsoft .NET Framework? Are you setting out to automate the Microsoft Office 2013 Lync Client with PowerShell? If you answered “yes” to the last three questions, then you’ve come to the right place! We’re going to take a look at how to get started automating the Lync 2013 client using PowerShell! Thanks to PowerShell’s direct support for Microsoft .NET Framework types, we can easily manage Lync Client functions from PowerShell, much in the way that C# developers can!

Download and Install the SDK

The first thing you need to do is go out to Microsoft’s download site and grab the Lync 2013 SDK. The installation process is fairly painless, so just click “Next” through it. By default, the installation path is: %ProgramFiles(x86)%\Microsoft Office\Office15\LyncSDK.

Figure: The root folder of the Lync 2013 SDK.
The root folder of the Lync 2013 SDK.

When you install the Microsoft Lync 2013 SDK, what you get is basically a series of Microsoft .NET assemblies (aka. .NET libraries) that allow you to perform automation functions on the Lync 2013 Client! Additionally, there is a CHM (compiled HTML help) file that contains some detailed documentation on how to utilize the SDK. If you’re interested in developing, get used to reading documentation!

Read moreAutomating the Lync Client with PowerShell

ConfigMgr OSD: Dynamically Named WIM Captures with PowerShell

In the context of the Operating System Deployment (OSD) feature in Microsoft System Center Configuration Manager (ConfigMgr), it is common that customers will perform a “build & capture” of their target operating system, and then deploy new computers using that reference (aka. “gold” or “base”) WIM image. This process is typically automated through a build & capture task sequence. The last step of a build & capture task sequence is typically the Capture Operating System task sequence item.

Capture Operating System
Capture Operating System

Within the configuration of the Capture Operating System task sequence step, most users of ConfigMgr will simply specify a static path to the destination of the resulting WIM image. This static naming can cause conflicts if the task sequence is executed multiple times, without first renaming the target file. Additionally, the same scenario can occur if the build & capture task sequence is executed on multiple, distinct systems simultaneously.

Read moreConfigMgr OSD: Dynamically Named WIM Captures with PowerShell

ConfigMgr: A Couple of Client Tweaks via PowerShell

Disable WINS Lookup via PowerShell & WMI If you’re running Microsoft System Center Configuration Manager, you probably don’t need to be using the WINS lookup for Server Locator Points. Normally, you’d have to de-install the ConfigMgr client, and then re-install it with the SMSDIRECTORYLOOKUP=NOWINS MSI property. If you don’t want to do that, and want … Read moreConfigMgr: A Couple of Client Tweaks via PowerShell

System Center 2012 SP1 Orchestrator: Getting Started with Configuration Manager 2012 Integration

Introduction

System Center 2012 SP1 Orchestrator is a tool to help automate enterprise processes. It stresses the reduction of code writing, which has its benefits, but also has its drawbacks. In my personal opinion, everyone should learn how to write code. These days, if you’re focused on the Microsoft platform, there is nothing better to learn than PowerShell. Knowing how to write code will help you to fill in gaps in the integration of two or more software products.

Given the wide array of functionality offered by System Center 2012 SP1 Configuration Manager, it would seem highly desirable to use Orchestrator to automate some of that functionality. You can perform functions such as:

  • Creating or deleting Collections
  • Invoke Collection membership evaluations
  • Add or remove Collection Membership Rules
  • Enumerate Collection members
  • Deploy Applications or Configuration Baselines
  • Invoke ConfigMgr client actions

In the next section, we’ll explore how to set up integration between Orchestrator and Configuration Manager.

Read moreSystem Center 2012 SP1 Orchestrator: Getting Started with Configuration Manager 2012 Integration

PowerShell: A first-timer’s perspective of PowerCLI

This blog post is a description of my first experience playing around with PowerCLI, which is VMware’s PowerShell module for managing vSphere servers. I haven’t really dealt with VMware much in my past, other than VMware Workstation, so I thought it was exciting to get the chance to play around with PowerShell & VMware together!

I won’t bore you with the installation details, and I’ll get right to firing it up. There’s a shortcut to launch PowerCLI in the Start Menu, and it’s got a custom icon on it, which makes it easily recognizable on the Windows Taskbar.

Read morePowerShell: A first-timer’s perspective of PowerCLI

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

PowerShell Twitter Update [2013-02-24]

So it’s getting close the end of February, and it’s been several months since I’ve blogged anything new! For today’s post, let’s take a look at what’s going on, on Twitter in the PowerShell universe! #ConEmu @tphakala says that he’s discovered a project called #ConEmu. #ConEmu is a project hosted on Google Code and offers … Read morePowerShell Twitter Update [2013-02-24]

PowerShell: Generating functions with dynamic parameter auto-completion values

Download the GetDevice PowerShell Module  There is a PDF copy of this entire blog post inside of the attached zip file. It’s much more readable. Introduction The purpose of this document is to describe the goal and solution for creating dynamically-injected parameter auto-completion values into PowerShell function definitions. This is simply a proof of concept, … Read morePowerShell: Generating functions with dynamic parameter auto-completion values