- $mg = (Get-ManagementGroupConnection).ManagementGroup
- $groups = $mg.GetRootPartialMonitoringObjectGroups() | sort DisplayName
- foreach($group in $groups) {
- $groupMembers = $group.GetRelatedPartialMonitoringObjects([Microsoft.EnterpriseManagement.Common.TraversalDepth]::OneLevel)
- $groupMembersCount = $groupMembers.count.ToString()
- $Msg = $group.DisplayName + "|" + $groupMembersCount
- #$Msg
- $Msg >> C:\SCOMGroupsMembersCountInProduction.txt
- }
agent group|3613
Agent Managed Computer Group|3613
Agentless Managed Computer Group|0
All Business Critical Windows Clients|0
All Computers in Management Pack Microsoft System Center Configuration Manager 2007|340
All Computers in ManagementPack: Microsoft.IdentityIntegrationServer|14
All VmWare servers|1332
All Windows Computers|3631
This posting is provided "AS IS" with no warranties.
No comments:
Post a Comment