Powershell count of number of members in AD Security Group

John Darby
John Darby used Ask the Experts™
Is there a simple phrase to query against a Security Group to get a count of members?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Assuming that you have imported the ActiveDirectory module:

(Get-ADGroupMember "Domain Admins" | Measure-Object).Count

This could also be encapsulated in a function so that you could feed the name of the group in as a parameter.


Thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial