Feb 03 2023 05:52 AM
Trying to find any Azure AD Groups we have with 0 total members.
Get-MsolGroup | ? {(Get-MsolGroupMember -GroupObjectId $_.ObjectId).count -eq 0 }
This is what i have as reference to go off but i belive im looking at the wrong field as its showing groups with devices / inherited members so its looking at an objectid field which again seems as if its bringing back the wrong data.
Trying to find the groups with 0 in either of the red highlighted sections.
i also had a play around with get-azureadgroup function but it was only finding about half of the groups we currently have.
Any help would be appreciated.
Thanks
Kyle
Feb 05 2023 12:01 AM
SolutionFeb 05 2023 06:53 AM
Feb 05 2023 12:01 AM
Solution