A Quick and Easy Way to Get Active Directory Counts

IT

A Quick and Easy Way to Get Active Directory Counts

When investigating an existing domain for a potential upgrade or clean-up, it’s necessary to gauge the number of Active Directory (AD) objects in order to decide how many domain controllers are needed. This is also just useful information to occasionally check in order to keep track of your AD growth percentage.

How to Check Your Active Directory Counts

Log in to any of your domain controllers, and bring up PowerShell as an Administrator. Enter the following commands to quickly check the counts for each category:

(Get-ADUser -Filter *).Count
(Get-ADGroup -Filter *).Count
(Get-ADComputer -Filter *).Count

getting active directory counts

This format can also be used to count the number of users in an AD group:

(Get-ADGroup <group> -Properties *).Member.Count

 

Or the number of users in a specific Organizational Unit (OU):

(Get-ADUser -Filter * -SearchBase “OU=Users,DC=example,DC=com”).Count

 

This PowerShell command should work on most Windows Server versions; it’s been tested on 2008 R2, 2012 R2 and 2016.

More About the Author

Lindsey Saunders

IT Systems Administrator
A Quick and Easy Way to Get Active Directory Counts When investigating an existing domain for a potential upgrade or clean-up, it’s necessary to gauge the number of Active Directory (AD) ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK