Creating an Azure Automation DSC configuration

In this example, we will use a simple DSC configuration that looks for the IIS Windows feature:

  1. Open a text editor, such as PowerShell ISE or Notepad ++.
  2. Enter the following simple Web Server (IIS) configuration into the editor and save it as DSCConfig.ps1:
configuration DSCConfig{    Node WebServer    {        WindowsFeature IIS        {            Ensure = 'Present'            Name = 'Web-Server'            IncludeAllSubFeature = $true        }    }    Node NotWebServer    {        WindowsFeature IIS        {            Ensure = 'Absent'            Name = 'Web-Server'        }    }  } 
  1. Navigate to the Azure portal at http://portal.azure.com and sign in.
  2. In the Azure portal, type Automation Accounts and select and open your Automation account.
  3. In Automation Account page, select DSC Configurations and click ...

Get Microsoft Operations Management Suite Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.