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 and
Powershellgallery. for my example we are going to use the configuration below.
Configuration WebServer
{
node IIS
{
WindowsFeature IIS
{
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
![image_thumb[3] image_thumb[3]](http://robplanktech.com/wp-content/uploads/2015/05/image_thumb3_thumb.png)
In the next blog post I will show you how to link the configuration to a Node.