Showing posts with label task. Show all posts
Showing posts with label task. Show all posts

Wednesday, April 19, 2017

Adding a powershell script in SCOM as a recovery task.

Adding a powershell script in SCOM as a recovery task.
Open the properties of the monitor.



Add the recovery task






 















Export the management pack  and open it in any text editor. You have to change the write action to powershell write action. Locate the enrty for write action and replace it with a powershell write action ID.
Replace
TypeID="Windows!Microsoft.Windows.ScriptWriteAction"

with

TypeID="Windows!Microsoft.Windows.PowerShellWriteAction"



Remove the <Arguments /> section.

Increment the version and import the management pack.