Powershell : Count Members of a AD Group

May 31, 2016

no comments

Powershell : Count Members of a AD Group

As System Administrator, In many cases you need to count members of AD group.

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
132

2016-07-17 11_54_56-Administrator_ Windows PowerShell

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*