configuration EnableIISFeature
{
    node localhost
    {
        WindowsFeature IIS
        {
            Ensure = “Present”
            Name = “Web-Server”                      
        }
    }
}

If you run this configuration in Powershell (EnableIISFeature), it will produce a localhost.mof file. This is the “compiled” configuration you can run on a machine.

To test the DSC configuration on your localhost, you can simply invoke the following:

Start-DscConfiguration -ComputerName localhost -Wait