System Center Operations Manager 2007 enables the ability to create custom scripts to monitor a system for a specified value, and react accordingly based on your requirements. In order to successfully accomplish this goal, we need to complete three basic steps: Create a .vbs script to monitor the values that we're interested in and return that data to System Center Operations Manager. Create an appropriately scoped Monitor Management Pack Object to leverage the newly created script. Test the Monitor Object for the desired results. Creating a .vbs script that can interface with System Center Operations Manager 2007 requires adding only a couple of additional steps to your script : We need to make sure that the script is leveraging the MOM Scripting API. We need to make sure that we return the results of our script back to System Center Operations Manager in a manner that it can understand. '******************************************************************************* '*For more guides and scripts visit http://www.mcpguides.com '*This System Center Operations Manager 2007 Script will monitor a Windows '*Server and detect if the computer requires a reboot. '*If no reboot is required, the state will be healthy. If a reboot is required '*the state will switch to unhealthy. '******************************************************************************* '*Configure system parameters and variables Dim flgRebootNeeded, oAPI, oBAG Set oAPI = CreateObject("MOM.ScriptAPI") Set oBag = oAPI.CreateTypedPropertyBag(StateDataType) Set objSystemInfo = WScript.CreateObject("Microsoft.Update.SystemInfo") '******************************************************************************* '*Check reboot value; if objSystemInfo = 0, no reboot is required. If it = -1, '* a reboot is required. flgRebootNeeded = objSystemInfo.rebootrequired If flgRebootNeeded = 0 Then Call oBag.AddValue("State","GOOD") Else Call oBag.AddValue("State","BAD") End If Call oAPI.Return(oBag) '******************************************************************************* '*End of Script In the script above, we are monitoring a Windows Server for the "rebootrequired" flag. We are then taking the results of that flag, and passing a "GOOD" or "BAD" string, depending on the results, to a newly created System Center Operations Manager 2007 parameter called "State". Click Read On to contine....