PowerShell: Counting users in Active Directory Group

Sometimes it is important to know how many users are in a particular Active Directory Security Group. The below PowerShell code will accomplish this for you. The Get-ADGroupMember cmdlet gets the members of an Active Directory group. Members can be users, groups, and computers. Code: $users = Get-ADGroupMember -Identity ‘Group Name’ $users.Count If you need

Read more