In the past few blog post I have shown you how to get started with Azure Automation DSC, in the first blog post I coved how to Enable Azure Automation Preview
and in the second how to Register Servers to Azure Automation DSC
. In this blog post I am going to go over how we can upload a DSC configuration to Azure Automation DSC.
First we will need a Configuration, there are a few public repositories the most popular two are on Github
. for my example we are going to use the configuration below.
Name = 'web-server'
Ensure = 'Present'
save the above configuration as webserver.ps1
Upload Configuration to Azure Automation DSC
$myConfig = $MyAutomationAccount | Import-AzureAutomationDscConfiguration -SourcePath 'C:\DSCConfigs\webserver.ps1' -Description "Test WebServer Config" -Published -force
$myConfig = Get-AzureAutomationDSCConfiguration -ResourceGroupName "mms-eus" -AutomationAccountName "MSDNAutomation"
Start Compilation Job
$myCompileJob = $myConfig | Start-AzureAutomationDscCompilationJob
Check Status of Compilation Job
$myCompileJob | Get-AzureAutomationDscCompilationJob
In the next blog post I will show you how to link the configuration to a Node.