Category: Desired State Configuration

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' Read more [...]

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: The code shown in the previous example uses switch statements Read more [...]

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' Read more [...]

Speaking on both PowerShell and DSC at SQL Saturday Baton Rouge 2016 this Weekend!

Although PowerShell has been around for 10 years now, there are still some who are just getting started with it. There are several categories that new comers fit into, some are just starting out in their career, others may be career changers, and others may have been in the industry for a number of years and are finally trying to embrace PowerShell. Regardless of which category you fit into, I'll be presenting a session on "PowerShell Fundamentals for the Absolute Beginner" at SQL Saturday #515 Read more [...]

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: https://youtu.be/fOov9gkqFHs 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 Read more [...]

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 Read more [...]

Code and Slides from my sessions at SQL Saturday 439

Today I presented two wildly successful sessions at SQL Saturday #439 in Columbus, GA. The code and slides from my "How do I Get-Started with PowerShell?" session can be downloaded here and the code and slides from my "PS C:\> Get-Started -With PowerShell Desired State Configuration" session can be downloaded here. The custom functions that are referenced in the code from the DSC session can be downloaded as part of my MrDSC module from GitHub. µ Read more [...]

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 Read more [...]

DSC session at Atlanta TechStravaganza one week from today!

Have you seen the awesome lineup of speakers and sessions for Atlanta TechStravaganza this year? Mark Minasi is the keynote speaker and there's an all day dedicated PowerShell track where Ed (The Scripting Guy) Wilson will be presenting along with several PowerShell MVP's including Stephen Owen, and me (of course). My presentation is on "Using PowerShell Desired State Configuration in your On-Premises Datacenter" and I'll share the initial slide of my slide deck that I created exclusively for Read more [...]

Presentation Materials from my sessions at SQL Saturday 423 in Baton Rouge

This past Saturday, I presented two sessions at SQL Saturday #423 in Baton Rouge. The code and slides that I used during my "PS C:\> Get-Started -With 'PowerShell for SQL Server'" presentation can be downloaded from here and the code and slides from my "PS C:\> Get-Started -With 'PowerShell Desired State Configuration'" presentation can be downloaded from here. The code from both sessions reference PowerShell functions that are part of script modules that can be downloaded from my Read more [...]

Presentation Materials from my Desired State Configuration Session at SQL Saturday 392 in Atlanta

This past Saturday, I presented a session titled "PS C:\> Get-Started -With 'PowerShell Desired State Configuration'" at SQL Saturday #392 in Atlanta. The code and slides that I used during the presentation can be downloaded from here. Some of the functions used in the downloadable code are part of my DSC toolkit module that can be downloaded from GitHub. Keep in mind that module is a work in progress. Here's a list of the items from the "Resources" slide that was shown towards the end Read more [...]

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.0.zip". Read more [...]

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

On Saturday May 16th, I'll be presenting a session titled "PS C:\> Get-Started -With 'PowerShell Desired State Configuration'" at SQL Saturday #392 in Atlanta. One of the things I'll be demonstrating is a SMB based DSC Pull Server and I figured since it's a DSC presentation, why not create it with DSC, right? 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 Read more [...]

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. Last week, you spent an entire day troubleshooting Read more [...]

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.1 Read more [...]