Desired State Configuration (DSC) – Experimenting with DSC Part 2 – Create configuration file to be pulled by the target node

Step 1. Create configuration for the target node, eg. GTPOCAUT001

*To be ran from the pull server, eg. GTDSCAUP001

*Modify the last line for different node names.

This creates a file named GTPOCAUT001.domain.local.MOF in the your current working directory.

Configuration IIS_Config
param ($MachineName)
Node $MachineName
#Install the IIS Role
WindowsFeature IIS
Ensure = “Present”
Name = “Web-Server”
#Install ASP.NET 4.5
WindowsFeature ASP
Ensure = “Present”
Name = “Web-Asp-Net45”
IIS_Config –MachineName “GTPOCAUT005.domain.local”


Step 2. Generate the GUID that will be used to name the mof file for this node


Step 3. Rename the created mof file using the new guid. “So GTPOCAUT001.domain.local.MOF” becomes “<guid>.mof”, where <guid> is the guid you generated.

Step 4. Copy the renamed file to “C:\program files\windowspowershell\dscservice\configuration”

Step 5. Generate Checksum file for the mof file

New-DSCChecksum "C:\program files\windowspowershell\dscservice\configuration\<guid>.mof"




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s