I hope this is the right forum for this type of post.
I'm relatively new to SCE - we only just purchased it a month or two ago, and currently we are only using it as a glorified WSUS server, so my experience with tweaking MPs and whatnot is limited... so please use small words (or references to other materials are always appreciated!).
I'm trying to create a recovery task for a failed "Computer Browser" service. Not 100% sure why the browser service stops, but that's outside the scope of this post.
I'm at the point where I'm looking at the alert in the Health Explorer for a specific client computer... Choose Monitor Properties, then Diagnostics and Recovery. I want to add a recovery task for a Critical Health State... good so far.
Now, I know that SC and NET commands don't have a RESTART function, I'm opting to create a script. But I have 2 management packs to choose from - "Default Management Pack" and "Microsoft SystemCenter Essentials Default User MP". What's the difference, and why would I pick one over the other?
Selected the "Default Management Pack", and hit next. Provide a title of "RestartComputerBrowserService.vbs" or something equally descriptive, and plug in some code found at http://myitforum.com/cs2/blogs/dhite/archive/2007/11/11/vbs-scripts-to-restart-remote-services-by-name-or-display-name.aspx, with some changes - I removed the input()'s in favour of SCE supplied parameters, and removed the MsgBox() at the end. So it looks like:
strComputer = $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$
strServiceName = "Browser"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Service Where Name = '" & strServiceName & "'")
For Each objItem in colItems
objItem.StopService(strServiceName)
Wscript.Sleep 10000
objItem.StartService(strServiceName)
Next
Date: 3/5/2008 10:12:49 AM
Application: System Center Essentials
Application Version: 6.0.1251.1
Severity: Error
Message:
: Verification failed with [1] errors:
-------------------------------------------------------
Error 1:
: Failed to verify Recovery [MomUIGenaratedRecovery1abf17211254493598eb06befaf1780b]
The Target Class [Microsoft.Windows.OperatingSystem] for Recovery [MomUIGenaratedRecovery1abf17211254493598eb06befaf1780b] does not derive from the Target Class [Microsoft.Windows.Client.XP.OperatingSystem] of the Monitor [Microsoft.Windows.Client.XP.OperatingSystem.ComputerbrowserServiceHealth] that this Recovery is assigned to.
-------------------------------------------------------
Failed to verify Recovery [MomUIGenaratedRecovery1abf17211254493598eb06befaf1780b]The Target Class [Microsoft.Windows.OperatingSystem] for Recovery [MomUIGenaratedRecovery1abf17211254493598eb06befaf1780b] does not derive from the Target Class [Microsoft.Windows.Client.XP.OperatingSystem] of the Monitor [Microsoft.Windows.Client.XP.OperatingSystem.ComputerbrowserServiceHealth] that this Recovery is assigned to.
: Failed to verify Recovery [MomUIGenaratedRecovery1abf17211254493598eb06befaf1780b]
The Target Class [Microsoft.Windows.OperatingSystem] for Recovery [MomUIGenaratedRecovery1abf17211254493598eb06befaf1780b] does not derive from the Target Class [Microsoft.Windows.Client.XP.OperatingSystem] of the Monitor [Microsoft.Windows.Client.XP.OperatingSystem.ComputerbrowserServiceHealth] that this Recovery is assigned to.
: The Target Class [Microsoft.Windows.OperatingSystem] for Recovery [MomUIGenaratedRecovery1abf17211254493598eb06befaf1780b] does not derive from the Target Class [Microsoft.Windows.Client.XP.OperatingSystem] of the Monitor [Microsoft.Windows.Client.XP.OperatingSystem.ComputerbrowserServiceHealth] that this Recovery is assigned to.
Any direction or suggestions? Am I going about this the wrong way?
Thanks in advance.