O'Reilly logo

Microsoft Operations Management Suite Cookbook by Chiyo Odika

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required