Query the amount of user accounts in Active Directory

Below are 3 simple commands that display how many users you have in AD, how many users that are enabled and also how many that are disabled.

Number of User Accounts 
(get-aduser –filter ).count

Number of Enabled User Accounts 
(get-aduser -filter *|where {$_.enabled -eq “True”}).count

Number of Disabled User Accounts 
(get-aduser -filter *|where {$_.enabled -ne “False”}).count

Leave a Reply

Your email address will not be published. Required fields are marked *