Invoke-WebRequest in PowerShell discovery fail

Today I encountered an error with a TimedPowerShell discovery. The Invoke-WebRequest command was the cause as I found out in the Event Log.


The targeted server was running Windows Server 2012 with PowerShell version 3. Apparently there is know bug:

The workaround is to open Internet Explorer with the account executing the command. Since the SCOM agent uses “Local System”, the solution is to run it with PsExec:

After starting Internet Explorer once with “Local system” the discovery finished the script with out errors.


Authoring, SCOM 2012

Leave a Reply

Your email address will not be published. Required fields are marked *