Friday, March 4, 2016

OpsMgr (SCOM) - Grey Agents

It's a problem of us all - true story.

But how can i easily get a list of them ?

Like this :

 New-SCOMManagementGroupConnection -ComputerName "localhost"  
 $Agents = Get-SCOMClass -name “Microsoft.SystemCenter.Agent"  
 $objects = Get-SCOMMonitoringObject -class:$Agents | where {$_.IsAvailable –eq $false}  
 ForEach ($object in $objects) {  
     $object.DisplayName  
 }  
My next step is to give you the reason! :)

No comments:

Post a Comment