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

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:
http://bit.ly/2bNwpXl

Result:
http://bit.ly/2bGT9pK

Conclusion : In this scenario, the fastest was :

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://bit.ly/2bnCRVk

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


Real-world example:

Couting the total numbers of users in Active Directory can be useful in some cases.

You could need this information to generate statistics or reports, or maybe you just want to monitor the number of accounts created / removed on regular basis.


 

4 thoughts on “The fastest Powershell #1 : Count all users in Active Directory domain

    1. Steve Renard Post author

      @zerocool18 : Thanks a lot for your feedback. Yes, I will continue the serie here, the next post should come on next month, right now I am pretty busy.

      @Jordi Ortiz Domenech : I take in consideration your suggestion, I will update this article in few weeks (including with another suggestion I received).

Comments are closed.