Book Image

Learning PowerShell DSC

By : James Pogran
Book Image

Learning PowerShell DSC

By: James Pogran

Overview of this book

Table of Contents (14 chapters)
Learning PowerShell DSC
About the Author
About the Reviewers

DSC features

At this point, we have covered what PowerShell DSC is, how it relates to DevOps and configuration management, and lightly stepped through how it is structured and how it compares to other solutions out there.

We will now cover the requirements and available versions of PowerShell DSC.

DSC requirements

In order to use DSC, both the computer you author the configuration files on (more on this later) and the target computers must have PowerShell 4 or greater installed. This means that at least WMF 4 is installed on all target hosts and the computer on which you are making your configuration files.

PowerShell DSC comes as part of PowerShell 4 and 5. PowerShell 4 will already be present on the following operating systems and no further action is needed to enable PowerShell v4:

  • Windows Server 2012 R2

  • Windows 8.1

PowerShell 4 will have to be installed on the following operating systems:

  • Windows Server 2012

  • Windows 7 SP1

  • Windows Server 2008 R2 SP1

PowerShell 5 supports installation on all the preceding operating systems.


Windows 8.1 and Windows Server 2012 R2, DSC requires an update to function correctly. The Windows update KB2883200 (also known as the GA Update Rollup) is required.

While it may already be installed depending on your patching process, you can check whether it is or not by running the following command:

[PS]> Get-HotFix -Id KB2883200
Source        Description      HotFixID      InstalledBy          InstalledOn              
------        -----------      --------      -----------          -----------              
HOSTNAME      Update           KB2883200     HOSTNAME\Admini...   9/30/2013 12:00:00 AM

The only dependency PowerShell has is on the .NET Framework. PowerShell v4 and v5 require .NET Framework v4.5. If you have Windows 2008 R2, please read the release notes at: carefully, because the WMF 4 installer will not alert you that .NET 4.5 is not already installed.

Some functions of DSC do not work on the client operating systems, as either the features needed aren't present on the client OSes, or due to various other reasons like licensing or software availability. Where applicable, we'll call out these differences as we come to them. Something to note is that some DSC Resources, such as the ones provided by the community or the xDscResource project (more on that later in Chapter 4, DSC Resources), do not work on Windows 2008. You will have to check the release notes for each DSC resource to determine what operating systems it is compatible with.

DSC versions

In the next chapter, we will delve into the details and inner workings of the DSC architecture. Before we do, it will help to have an overview of the Cmdlets and tools at your disposal when working with DSC. Some terms and concepts may be fuzzy here, but will be explained in much more detail in further chapters. We can also use this section as a reference while authoring our own DSC configurations and resources.

PowerShell DSC is released as a feature of PowerShell, so its versioning scheme follows that of PowerShell. PowerShell is distributed as part of the WMF. When referring to the installed version of DSC, we use the version of PowerShell that is installed to denote which version of DSC is currently running.

PowerShell v5, at the time of publication, has not been released yet and is still in production preview status, but we will still cover both v4 and v5 in this book. This will make things somewhat more complex to explain, as we will have to list, compare, contrast, and cover all the similarities and differences between the two versions as we move along. However, it is important to cover these because we fully expect you to have to deal with both PowerShell v4 and v5 deployed in your environments at the same time. The final version of PowerShell v5 is slated to be released in late 2015, so realistically, you will have PowerShell v4 on your production systems for quite a while before moving to v5.