SCOM Monitor based on PowerShell Script.

Hi all!

I have a few things I would like to monitor with a PowerShell script.  Just to clear things up, is it correct to say that the 'official' way to do this is to use the SCOM 2007 R2 Authoring Console or Visual Studio with authoring extensions?

In other words, If I am using the newest version of SCOM (2012 SP1), and want to use the 'newest' scripting language (PowerShell), I need to go through what looks like a very painful process involving an Authoring Console from 2007 R2.  Or I need Visual Studio.

My question is this:  Is there a simpler way to create a PowerShell monitor, perhaps using functionality built into the SCOM 2012 Console?  If not, is this something Microsoft plans to address?

A few resources I've picked up:

  • http://social.technet.microsoft.com/wiki/contents/articles/15251.system-center-management-pack-authoring-guide.aspx
  • http://technet.microsoft.com/en-us/library/ff381420.aspx
  • http://www.systemcentercentral.com/opsmgr-probing-a-web-service-with-with-powershell-2-0-in-a-two-state-monitor/ (5 links at the bottom of the post)
  • A response to a similar question from 3 years ago

Cheers!



August 15th, 2013 8:49pm

Hi

SCOM 2007 MP are compatible with scom 2012, so you can use authoring console or visual studio authoring (SCOm 2012 ) to developed MP's for SCOM 2012.

refer below video how to create powershell script base monitor  

http://technet.microsoft.com/en-us/video/how-do-i-create-a-rule-and-monitor-using-a-windows-powershell-script-in-a-system-center-operations-manager-management-pack.aspx

Regards

Free Windows Admin Tool Kit Click here and download it now
August 16th, 2013 8:22am

The Visual Studio Authoring Extensions allow you to create management packs for System Center 2012 - Operations Manager using Visual Studio
SCOM 2007 R2 Authoring Console is an authoring tool for create management packs for SCOM 2007 R2, thought it is compatible for SCOM 2012 environment.
If you a starter on creating monitor with powershell, I recommend that you are using Visual Studio Authoring Extensions.

Roger

August 16th, 2013 10:54am

Hi all,

Thanks, unfortunately that is what I'm trying to avoid.  I don't use Visual Studio, and my time is somewhat limited, would not like to use the authoring console.  I can create a quick monitor based on a vbscript right in the SCOM Console.  I cannot do this with PowerShell, which I am much more fluent in.  This seems strange.  I need to go through external tools and various extra steps to use the scripting language that Microsoft has been pushing for years?

*EDIT:  It appears the VSAE require Visual Studio 2010 Ultimate or greater.  Yeah.  That's not helpful.  If I want to make a simple powershell based monitor, I need to pay for and deal with an outdated IDE, or use the Authoring Console for SCOM 2007 R2.  From my perspective, this is ludicrous.  I will dive into the authoring console.

SCOM is a great solution.  It's very flexible and powerful.  On the other hand, I feel like it's good at giving thousands of tiny paper cuts.  Many small things that don't work, don't work as expected, etc. where there might be a workaround if you are lucky, and the workaround probably won't be simple.

Cheers!


Free Windows Admin Tool Kit Click here and download it now
August 16th, 2013 8:05pm

Below is the material of how to use Powershell to monitor
http://hindenes.com/trondsworking/2011/08/30/using-system-center-operations-manager-and-powershell-to-monitoranythingpart-1-2/
http://hindenes.com/trondsworking/2011/09/01/using-system-center-operations-manager-and-powershell-to-monitoranythingpart-2-designing-the-service-model/
http://hindenes.com/trondsworking/2011/09/06/using-system-center-operations-manager-and-powershell-to-monitoranythingpart-3-discoveries-with-powershell/
http://hindenes.com/trondsworking/2011/10/03/using-system-center-operations-manager-and-powershell-to-monitoranythingpart-4-scom-performance-data-from-powershell-scripts/

Also there is a sample of create a two-state powershell script monitor
http://www.systemcentercentral.com/awesome-scom-series-how-to-create-a-two-state-powershell-script-monitor-using-the-authoring-console/

Roger

August 20th, 2013 6:40am

Yes, so the issue here is that Microsoft does not expose a reasonable way to add a PowerShell based monitor or rule.

  • Using the SCOM 2007 R2 Authoring Console - Requires using an external application, external application is outdated, process is cumbersome
  • Using Visual Studio Authoring Extensions - Requires using an external application, external application is outdated, external application is not free

From my perspective this is a problem.  Do I spend my time trying to do everything in vbscript?  Do I try to learn an outdated authoring application where the skillset won't help me with anything but SCOM?  Do I decide not to monitor these items?

Free Windows Admin Tool Kit Click here and download it now
August 20th, 2013 10:23pm

Bump : )  System Center 2012 R2 has been available for a short while now!  Am I going to be able to create a PowerShell based monitor without relying on very outdated and potentially expensive solutions like the 2007 R2 Authoring Console or Visual Studio, respectively?

Would be really helpful to have this.  Many organizations will have and will be actively building many re-usable scripts and functions over PowerShell.  The vbscript solutions are fewer and farther between, and is generally frowned upon for new solutions.

Please consider script based monitors based on PowerShell.

Cheers!

January 10th, 2014 5:59am

Hi, try this

http://gallery.technet.microsoft.com/Sample-Management-Pack-17b76379

Free Windows Admin Tool Kit Click here and download it now
January 10th, 2014 10:03am

Assuming it works, that is exactly what I'm looking for.  Thank you very much Alexis (and Wei)!
January 11th, 2014 12:45am

Hei

Here is a great way of creating PowerShell Monitors using the GUI...http://blogs.msdn.com/b/wei_out_there_with_system_center/archive/2013/10/03/opsmgr-using-wizards-to-create-powershell-based-monitors.aspx

Cheers,

Stefan

Free Windows Admin Tool Kit Click here and download it now
January 11th, 2014 2:01am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics