MS: AD: Count users in organizational units using PowerShell

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” Reference: http://idefixwiki.no/2013/10/23/ad-count-users-in-organizational-units/

Advertisements