View number of User Accounts in AD via AD PowerShell

2017-12-11T14:11:40+00:00 July 24th, 2012|Azure, Cloud|

 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