Command Shell Examples
Useful SQL Queries
Groups and related information - Jonathan Almquist on Operations Manager - Site Home - TechNet Blogs

Groups and related information

Groups and related information

  • Comments 1
  • Likes

Return state of a group

foreach($a in get-monitoringobjectgroup){if($a.DisplayName -eq "group name"){$a.HealthState}}

Return contained instances of a group and state of each instance

foreach ($group in get-monitoringobjectGroup) {if($group.DisplayName -eq "group name") {$group.GetRelatedMonitoringObjects() | ft DisplayName,HealthState}}

Return management pack a group is stored in

ForEach ($Group in get-MonitoringObjectGroup) {If ($Group.DisplayName -eq "group name") {get-MonitoringClass | where {$_.Id -eq $Group.Id.ToString()} | Foreach-Object {$_.getManagementPack()} | Select @{Name="Group Name";Expression={$Group.DisplayName}},@{Name="MP Name";Expression={$_.Name}},@{Name="MP DisplayName";Expression={$_.DisplayName}} | fl}}


Command Shell Reference

I do not moderate this blog anymore. If you have a question regarding this post, send me a message.

  • excellent