Blog

June 03 2009 1:48 AM

Q: Is there an Operations Manager 2007 equivalent of the ResponseTest Resource Kit utility?

A: According to the OpsMgr 2007 SDK, all you need to do is copy the MOMScriptAPI.dll from any management server to your workstation. Then use regsvr32 to register the dll, and you are ready to go! You can then write, run and debug Operations Manager runtime scripts on your XP or Vista workstation - no console required. XML Script output is echoed to the command window on your screen. This allows you to check the data being returned by your script before you go to the work

The problem: However, when I tried this, registering the dll failed with a "Loadlibrary (MOMScriptAPI.dll) failed" error.

The fix: A little work with Process Monitor revealed that the HealthServiceRuntime.dll was being called, but was absent. Simply copying HealthServiceRuntime.dll to the same directory as the MOMScriptAPI.dll and then running regsvr32 MOMScriptAPI.dll again solved the problem.

The real fix is to simply load an OpsMgr agent on the workstation where you will develop your scripts. This will allow logging events to the Operations Manager Event log through the MOMScriptAPI

To Test: Perform the above steps and then run this simple ping script from a command line (which pings localhost). Propertybag data will be returned in your console. Have fun!


 Print  

Quick Links
Top Contributors
Featured Members
Pete Zerger
Points: 41211
Level: System Center Expert
Simon Skinner
Points: 30429
Level: System Center Expert
Tommy Gunn
Points: 29964
Level: System Center Expert
Stefan Koell
Points: 20109
Level: System Center Expert
Tenchuu
Points: 15261
Level: System Center Expert