DSC ConfigurationData parameter in Azure ARM template deployment DSC ConfigurationData parameter in Azure ARM template deployment powershell powershell

DSC ConfigurationData parameter in Azure ARM template deployment


To pass your configuration data to the DSC Extension you need to save it to a *.psd1 file, for example:

    C:\ PS> Get-Content C:\ConfigurationData.ps1     @{        AllNodes = @(            @{                NodeName                    = '*'                PSDscAllowPlainTextPassword = $true            }        )    }

Then upload this file to a location accessible from your VM and pass the URI in the protected settings of your template:

    "protectedSettings": {        "DataBlobUri": "https://.../ConfigurationData.psd1"    }

Two suggestions not related to your original question:

  • Version 1.7 of the DSC Extension may produce intermittent errors during some ARM deployments. I would suggest taking a look at Version 2.0

  • You may want to encrypt passwords instead of using PSDscAllowPlainTextPassword. The DSC Extension uses encryption certificates already deployed to the VM by Azure, so setting up encryption is very simple. More information here


This has changed with newer version see documentation.

In a nutshell now the psd1 has to be located at the same level as the rest of configuration elements and the SAS Token under the protected settings section.

"settings": {  "configurationData": {    "url": "https://foo.psd1"  } },"protectedSettings": {  "configurationDataUrlSasToken": "?dataAcC355T0k3N"}