Welcome to MSDN Blogs Sign in | Join | Help

So what about diagnostics and recoveries?

Another new capability in OpsMgr is being able to execute diagnostics and recoveries as reactions to monitor state changes. The OpsMgr MP defines a number of diagnostics to keep the agents healthy and repair them if need be. Here is a powershell script that will shed some light on what diagnostics and recoveries exist in your installation:

Diagnostics: 

$mgConnection = (Get-ManagementGroupConnection).ManagementGroup

$diagnostics =  $mgConnection.GetMonitoringDiagnostics()

$diagnostics | select-object DisplayName,ExecuteOnState,@{name="Monitor";expression={foreach-object {$mgConnection.GetMonitor($_.Monitor.Id).DisplayName}}},@{name="MP";expression={foreach-object {$_.GetManagementPack().DisplayName}}} | sort DisplayName | fl

Recoveries: 

$mgConnection = (Get-ManagementGroupConnection).ManagementGroup

$recoveries =  $mgConnection.GetMonitoringRecoveries()

$recoveries | select-object DisplayName,ExecuteOnState,@{name="Monitor";expression={foreach-object {$mgConnection.GetMonitor($_.Monitor.Id).DisplayName}}},@{name="Reset Monitor";expression={foreach-object {$_.ResetMonitor}}},@{name="MP";expression={foreach-object {$_.GetManagementPack().DisplayName}}} | sort DisplayName | fl

 

Published Monday, August 06, 2007 6:03 AM by Boris Yanushpolsky
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# MSDN Blog Postings » So what about diagnostics and recoveries?

# A Great place for SCOM scripts

Thursday, August 21, 2008 12:40 PM by Dario IT Solutions Blog

Check out Boris Yanushpolsky's blog ( http://blogs.msdn.com/boris_yanushpolsky ). Boris is an SCOM

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker