Video: Recreate MOF based DSC resources as Class based DSC resources

Last month I presented a session on how to Recreate MOF based DSC resources as Class based DSC resources at the PowerShell + DevOps Global Summit in Seattle, Washington. The session seemed to be well received by the audience based on the feedback that I received from the attendees. The video from this presentation is now available. The code and slides used during the demonstration can be found in my presentations repository on GitHub....

May 10, 2018 · 1 min · 75 words · Mike F. Robbins

Create a Certificate to Encrypt MOF Passwords that’s Compatible with DSC in PowerShell version 5.0

I’ve previously written a blog article titled Use a certificate with PowerShell DSC to add a server to Active Directory without hard coding a password where I had created a certificate that was used to encrypt the password in a PowerShell version 4 DSC (Desired State Configuration) MOF file. The same procedure in PowerShell v5 generates an error stating the certificate cannot be used for encryption: ConvertTo-MOFInstance : System.ArgumentException error processing property ‘Password’ OF TYPE ‘MSFT_Credential’: Certificate ‘6EBFB5C88AB4B8C9E3B8E30E88A5D071D6735464’ cannot be used for encryption....

October 13, 2016 · 2 min · 411 words · Mike F. Robbins

Simplifying my PowerShell version 5 Class Based DSC Resource for Configuring Remote Desktop

Last week I wrote a blog article about a PowerShell Desired State Configuration Class Based Resource for Configuring Remote Desktop. Since then I’ve discovered and learned a couple of new things about enumerations in PowerShell that can be used to simply the code even further. My original code used a couple of enumerations which I’ve removed to show how they can be used to further simply the code: class RemoteDesktop { [DscProperty(Key)] [string]$UserAuthenication [DscProperty(Mandatory)] [string]$Ensure [RemoteDesktop]Get() { $this....

October 6, 2016 · 4 min · 700 words · Mike F. Robbins

PowerShell Desired State Configuration Class Based Resource for Configuring Remote Desktop

Prior to PowerShell version 5 being released, I had written a PowerShell version 4 compatible DSC (Desired State Configuration) resource named cMrRDP for configuring Remote Desktop. It can be found in my DSC respository on GitHub. The recommendation at that point was to use the letter “c” as the prefix for community created DSC resources. The current recommendation is to no longer use the “c” prefix for DSC resources. Steven Murawski wrote a blog article titled DSC People - Let’s Stop Using ‘c’ Now that I recommend taking a look at....

September 29, 2016 · 4 min · 812 words · Mike F. Robbins

Video: Creating a Custom PowerShell Toolkit to Demystify DSC

Last week, on Monday (April 4th, 2016), I presented a session at the PowerShell and DevOps Global Summit 2016 on “Creating a Custom PowerShell Toolkit to Demystify the Intricacies of Desired State Configuration”. The video from that presentation is now available: Here’s the abstract or synopsis for this presentation: “DSC (Desired State Configuration) can be very complicated when working in an environment where nodes are set to retrieve their configuration from a pull server....

April 16, 2016 · 2 min · 323 words · Mike F. Robbins

Solving DSC Problems on Windows 10 & Writing PowerShell Code that writes PowerShell Code for you

I recently ran into a problem with DSC on Windows 10 when trying to create MOF files with DSC configurations that work on other operating systems. An error is generated when the friendly name for a DSC resource contains a dash and that friendly name is specified as a dependency for another resource. I know that only certain characters are allowed in the name that’s specified for DependsOn and I’ve run into similar problems with things such as IP addresses due to the dot or period, but the dash works in other operating systems at least with the production preview of PowerShell version 5, but not with the version of PowerShell version 5 that ships with Windows 10:...

November 5, 2015 · 7 min · 1459 words · Mike F. Robbins

Video from Atlanta TechStravaganza 2015: Using PowerShell Desired State Configuration in your On-Premises Datacenter

This past Friday, I presented a session titled Using PowerShell Desired State Configuration in your On-Premises Datacenter at Atlanta TechStravaganza 2015. Fellow PowerShell MVP Stephen Owen took this photo as I was preparing for my session: Another fellow PowerShell MVP, Jonathan Walz of the PowerScripting Podcast, recorded all of the sessions in the PowerShell track which can be found on their YouTube channel. Several presentations are included in each of the videos and mine is approximately the first 43 minutes of this video:...

August 27, 2015 · 2 min · 260 words · Mike F. Robbins

Deploy Desired State Configuration Resources with an SMB based Pull Server

So you’ve either downloaded DSC resources from GitHub or you’ve created some DSC resources of your own and the LCM (Local Configuration Manager) on the servers in your environment is set to use an SMB based DSC pull server. To automatically deploy those custom resources with an SMB pull server, they need to be zipped up including their base directory and named ResourceName\_Version.zip. For example, the xSmbShare DSC resource that can be download from GitHub would be named xSmbShare\_1....

May 14, 2015 · 2 min · 236 words · Mike F. Robbins

Create a DSC SMB Pull Server with DSC and separate the Environmental Config from the Structural Config

The machines used in this blog article are running Windows 8.1 and Windows Server 2012 R2. Both have the default version of PowerShell installed that shipped with those operating systems which is PowerShell version 4. The following configuration uses the xSmbShare and the PowerShellAccessControl DSC resources which can be downloaded from GitHub. These resources must exist on the machine where you’re authoring the DSC configuration and on the node that the configuration is being applied to....

May 7, 2015 · 4 min · 753 words · Mike F. Robbins

Automatically create a checksum and publish DSC MOF configuration files to an SMB pull server

You’ve configured one or more DSC (Desired State Configuration) SMB pull servers in your environment. You’ve also configured the target nodes appropriately. One problem that seems to be a constant problem in your environment when authoring and updating DSC configuration files (MOF files) is keeping track of what GUID belongs to which machine and it’s also a common problem to forget to update the corresponding checksum when a configuration file is updated....

March 5, 2015 · 5 min · 963 words · Mike F. Robbins

Using PowerShell Desired State Configuration to build the first domain controller in your Active Directory forest

If you’re a frequent reader of the blog articles on this site, then you know that I’ve been working on using Desired State Configuration to build my test lab environment that runs as Hyper-V VM’s on my Windows 8.1 computer. If you would like to know the current state of my test environment, see the previous blog article: Creating a Desired State Configuration Resource for Self Signed Certificates. The certificate created in last week’s blog has been exported and copied to the Windows 8....

February 12, 2015 · 4 min · 665 words · Mike F. Robbins

Creating a Desired State Configuration Resource for Self Signed Certificates

For those of you who follow my blog, you know that I’ve been working on using DSC (Desired State Configuration) to fully automate the build of my test environment that runs as Hyper-V VM’s on my Windows 8.1 computer. Last week in my blog article titled Automate the installation of DSC Resource Kit Wave 9 resources with PowerShell Desired State Configuration, I demonstrated how to do just that, automate the installation of the Microsoft created DSC resources that are part of the most recent DSC resource kit (wave 9)....

February 5, 2015 · 6 min · 1131 words · Mike F. Robbins