View number of User Accounts in AD via AD PowerShell

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

 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 Comment

like what you see? 

Sign-up to our newsletter and never miss out on the latest blogs, events and tech news from the world of risual
Give it a try, you can unsubscribe anytime.