Desired State Configuration – part 2

Now the Pull server is up and running, the next step is to configure “A” server to use the newly created Pull server. For this the windows feature Windows PowerShell Desired State Configuration Service (DSC-Service) must be installed and the DSC localconfiguration must be configured to use the Pull server.

The service can be installed using “Add-WindowsFeature -Name DSC-Service”. Although we can manual install the windows feature, it also possible to use DSC to push the configuration from the Pull server to the target server. The following push configuration will install the Windows feature “DSC-Service” on server “A”:

Running the config “Install-DscConfiguration will result in a A.mof file

Now we can push the configuration (as a .mof file) to server “A”.

Doing this will install DSC on the remote server. The next step is to configure server “A” to use the Pull server as a configuration source. How to make the configuration is explained in this Technet article.

As you can see in the above example, there is no servername present in the configuration. Server “A” is configured to request a configuration with the name “cc53d975-c5d3-43ab-9f5c-124aedb976f0”. There is no database for the servername <-> GUID translation in DSC. When making configurations you need to document/keep track which GUID and servername are paired. I’ve seen examples of storing servername/GUID in an csv file, or stored in an AD attribute. Needles to say that each server needs an unique GUID.

Use Set-DscLocalConfigurationManager -ComputerName “A” -Path

To create an GUID you can use this example to create one.

And add the GUID to your Local configuration
To store the GUID in a field in the AD object, for example ExtensionAttribute1. This way it’s easy to keep a relation between the GUID and the servername. You could also create computer objects to represent non-domain joined computers. Replace the

The DSC configuration on server “A” is now configured to check every 15 minutes for a (new) configuration on the Pull server.

Create a new configuration with the GUID of the server and place it in the configuration folder on the Pullserver. The location is specified when creating the Pullserver. In the previous example when creating the Pullserver it was  specified as “$env:PROGRAMFILESWindowsPowerShellDscServiceConfiguration


DSC resources