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.


$users = Get-ADGroupMember -Identity 'Group Name' 


PowerShell: Counting users in Active Directory Group

If you need assistance with Microsoft PowerShell or Active Directory,  please give us a call today!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.