locked
Issue with DSC Script RRS feed

  • Question

  • Just trying to create a script to install IIS and Management Tools and getting the error below, any idea what could be the cause of it?

    Configuration iis_dsc_file
    {
    # Import the module that contains the resource we are using.
    
    Import-DSCResource -ModuleName PsDesiredStateConfiguration
    Import-module servermanager
    # The Node statement specifices which targets this configuration will be applied to.
    Node localhost
      {
      # Code to ensure IIS feature is enabled
      WindowsFeature WebServer
        {
        Ensure= "Present"
        Name= "Web-Server"
        }
    
      WindowsFeatures IISManagementTools {
        Name= "Web-Mgmt-Tools"
        Ensure= "Present"
        IncldueAllSubFeature= $True
        LogPath= "C:\ServerLogs\IIS-Installation-Log.txt"
        }
      }
    }

    I get the below error message:

    The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to S"prettyprint" style="">

    Friday, September 21, 2018 1:29 AM

All replies