Creating Hyper-V VM’s with Desired State Configuration

I’m looking to automate the build of my test environment that runs as Hyper-V virtual machines on my Windows 8.1 Laptop computer. To get started, I thought I would take a look at the xHyper-V DSC resource to create the actual VM’s. There’s also no reason this shouldn’t work on a Windows Server that’s running the Hyper-V role. The Hyper-V role has already been added to my Windows 8.1 computer. I also have a previously created virtual hard drive (vhdx) file that has been loaded with the Windows Server 2012 R2 operating system and all of the available Windows updates....

January 22, 2015 · 701 words · Mike F. Robbins

Use a certificate with PowerShell DSC to add a server to Active Directory without hard coding a password

A new Windows Server 2012 R2 machine has been brought online and needs to be joined to your Active Directory domain. All machines used in this demonstration are running either Windows Server 2012 R2 or Windows 8.1 with PowerShell version 4. You’ve decided to use DSC (Desired State Configuration) to join this new server to the domain because it’s a prototype for many more servers to come. You plan to automate their deployment along with the majority of their configuration with DSC....

December 4, 2014 · 1035 words · Mike F. Robbins

PowerShell Desired State Configuration Error: Undefined Property ConfigurationName

The scenario in this blog article is that you’ve created a DSC configuration on a computer that’s running a preview of PowerShell version 5. The machine itself could be running Windows 8.1, Server 2012 R2, or the Windows Technical Preview version of Windows 10. Here’s a simple configuration that I’ll use to demonstrate the problem. This DSC configuration uses a custom DSC resource to rename a computer. This configuration is being created on a machine running the Windows Technical Preview version of Windows 10 with PowerShell version 5 build 9860 (the most recent build as of this writing)....

October 30, 2014 · 576 words · Mike F. Robbins

Creating a Custom DSC Resource to Configure Jumbo Frames on Network Cards

Recently while working on configuring a new server with DSC (Desired State Configuration), I discovered that there wasn’t a DSC resource for configuring the jumbo frames setting on network cards so I decided to write my own. This blog article steps you through the process of creating a custom DSC resource, specifically one that is used to configure the jumbo frames setting on network cards. The specific settings for jumbo frames can vary depending on your network card manufacturer and the specific driver....

October 2, 2014 · 1804 words · Mike F. Robbins

PowerShell Version 5 New Feature: New Parameters added to the New-DscCheckSum and Test-DscConfiguration Cmdlets

I’m continuing on my series of blog articles on the new features in the preview version of PowerShell version 5. Today I’ll be discussing the existing DSC (Desired State Configuration) cmdlets in PowerShell version 4 that now have new parameters as of the May 2014 preview version of PowerShell version 5. To begin, I’ll define a DSC configuration that’s parameterized so that it’s reusable: configuration iSCSI { param ( [Parameter(Mandatory)] [string[]]$ComputerName ) node $ComputerName { WindowsFeature MultipathIO { Name = 'Multipath-IO' Ensure = 'Present' } Service iSCSIService { Name = 'MSiSCSI' StartupType = 'Automatic' State = 'Running' } } } Run the configuration specifying the computer names to create MOF files for:...

June 12, 2014 · 392 words · Mike F. Robbins

Using PowerShell Desired State Configuration to Unzip Files

A couple of months ago I wrote a blog about a PowerShell Function to Unzip Files Using the .NET Framework 4.5 with Fallback to COM. I’ve since discovered that the new Desired State Configuration (DSC) feature in PowerShell version 4 can unzip files. You probably wouldn’t use this feature just to unzip a single file to a single server, but it does open up some interesting possibilities. This blog article is not meant to be an all inclusive tutorial on DSC, it’s only meant to give you a peek inside the built-in DSC Archive Resource capabilities....

October 3, 2013 · 332 words · Mike F. Robbins