The fastest Powershell #1 : Count all users in Active Directory domain

By | February 10, 2015

Updated : October 01, 2015

Question : What is the fastest solution to count all the users in Active Directory domain?

Answer : To answer this question, I will compare 17 different commands in a domain with 75 000 users.

First, I check that all these commands return the same value:




Conclusion : In this scenario, the fastest was :
AdFind.exe -b 'DC=domain,DC=com' -f 'sAMAccountType=805306368' -c

Links :

Download AdFind (adfind.exe)

Download System.DirectoryServices.Protocols module (S.DS.P.psm1)

Download QAD cmdlets (Get-QADUser)

All these tools in one file :

Note : If you have a faster solution, feel free to comment below so I can update my article.


Leave a Reply

Your email address will not be published.