YES!

And I am planning on releasing some MP authoring examples of this in an 
upcoming blog post.

There are two ways.....


  1.  You can call powershell.exe and then pass a big long command line as a 
powershell command/script  (this is how most examples on the web work)  This 
method I do not like because it does not support a good way to override 
parameters to the task.



  1.  You can call a datasource with a task, pass data to it, then that 
datasource calls a probe action PS script.  (more complicated, but MUCH more 
powerful.


Examples:

https://gallery.technet.microsoft.com/SCOM-Agent-Management-b96680d5

https://rburri.wordpress.com/2015/08/19/which-powershell-version-is-my-scom-agent-using-or-why-i-love-scom-2012-r2-update-rollup-7/





From: [email protected] [mailto:[email protected]] On 
Behalf Of Sylvain Hamel
Sent: Tuesday, May 2, 2017 4:01 PM
To: [email protected]
Subject: [msmom] SCOM 2016 Agent tasks - Powershell support

Hi Guys,

Does anyone know if SCOM 2016 supports Powershell scripts as tasks ?  Currently 
with SCOM 2012, you can only do .js or .vbs.  You can call Powershell.exe with 
a one-liner but that's not optimal.

Sylvain Hamel
IT Technical Leader, Core Infrastructure Applications
McGill University - Network and Communication Services




Reply via email to