Home > Microsoft > AD: Count users in organizational units

AD: Count users in organizational units

October 23, 2013

To count user accounts in an organizational unit, run this powershell command:

(Get-ADUser -Filter * -SearchBase “ou=Users,ou=A1,dc=contoso,dc=com”).count

Where “ou=” is the path for your OU and “dc=” is yorur domain. My query runs against “contoso.com\users”

Tags: ,
%d bloggers like this: