Thursday, October 24, 2013

Quick Trick: SCOM 2012 & SCOM 2007 R2 PS Provider

Sometimes it’s handy to use the old SCOM 2007 PS R2 Provider in SCOM 2012. Why? Sometimes old PS scripts need to be run and you didn’t find the time (yet) to convert them to the SCOM 2012 PS Provider.

But how to go about it? It’s fairly simple. Run these three commands in the Operations Manager shell and you can run all your old (but still effective) SCOM 2007 PS scripts Smile:

  1. add-pssnapin "Microsoft.EnterpriseManagement.OperationsManager.Client"
  2. new-managementGroupConnection –ConnectionString:<NAME OF YOUR SCOM 2012 MS SERVER>
  3. set-location "OperationsManagerMonitoring::"

After these commands the SCOM 2007 PS R2 Provider is loaded and active. Now you can run your old SCOM 2007 R2 PS scripts.

WARNING
Even though this trick works perfectly, you should only run these SCOM 2007 R2 based PS scripts when you’re ABSOLUTELY sure they don’t harm your SCOM 2012x environment!!!

1 comment:

kris said...

Where can i find the SCOM 2007 PS provider ?

I have scom 2012 R2 environment and need to run a SCOM2007 script to gather info from SCOM2012