@OdgeUK , I have tried to write a script which will query out all the group in unsealed MP without any member. Here is the script for the reference:
Import-Module OperationsManager
$MPs = Get-SCOMManagementPack | ?{!$_.Sealed}
$MPGroupClasses = @()
foreach ($MP in $MPs) {
$MPClasses = $MP.GetClasses()
If ($MPClasses.count -gt 0) {
foreach ($Class in $MPClasses) {
If (($Class.Name -ne "System.Entity") -and (($Class.GetBaseTypes()).Name.Contains("System.Group"))) {
$MPGroupClasses += $Class
}
}
}
}
$GroupsByMP = Get-SCOMGroup -Id $MPGroupClasses.Id
foreach ($Group in $GroupsByMP) {
$Members = $Group.GetRelatedMonitoringObjects()
If ($Members.count -eq 0){
$group}
}
Hope it can help.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.