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:

the-fastest-AD-Count-Check

Result:

the-fastest-AD-Query

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

Links :

Download AdFind (adfind.exe)
http://www.joeware.net/freetools/tools/adfind/

Download System.DirectoryServices.Protocols module (S.DS.P.psm1)
https://gallery.technet.microsoft.com/scriptcenter/Using-SystemDirectoryServic-0adf7ef5

Download QAD cmdlets (Get-QADUser)
http://software.dell.com/products/activeroles-server/powershell.aspx

All these tools in one file :
http://powershell-guru.com/tools/The-Fastest-Count-AD-Users.zip

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


next-button

Leave a Reply

Your email address will not be published.