This example is from provisioning a Windows client on Azure and using a bootstrap (Custom Script Extension) for using PowerShell DSC (Pull) off a Server 2016 (WMF 5) DSC server.

I’m using Self-Signed certificates in my environment. One certificate is for the webserver of my DSC server. The second certificate is for DSC to use for encryption.

I use the Custom Script Extension to ensure that both certificates are trusted by importing them into the machine certificate store.

After the certificates are imported, I ensure the PowerShell DSC Feature is installed.

I also configure the Local Configuration Manager to point to my DSC Pull Server.

Note that the GUID I have specified matches a generic DSC Pull Sequence that has been created on the DSC Pull Server

Windows Management Framework 5.1

The problem we currently face is using mixed versions of Windows Management Framework between the DSC Pull Server and clients. Azure Marketplace Images are not consistent with the version of the framework used and this leads to a decryption problem with received MOF files if you use Server 2016 against Windows Server 2012 R2 provisioned clients.

The solution is to upgrade Windows Management Framework as part of the bootstrap install.

I’ve copied the Microsoft Update File for WMF to an accessible server (as my machines can’t download from the internet). As it’s the last part of my bootstrap, I forcibly reboot the machine as part of the upgrade.

Once the machine restarts it will be able to decrypt the MOF files being pulled from the DSC Pull Server