Count directory Objects in Active Directory


Some times you need to find out how many directory Objects you have in your AD.
A quick way of getting this done is to use the following PowerShell​ string

​​Get-ADObject -Filter {name -like ‘*’} -SearchBase ‘CN=Schema,CN=Configuration,DC=sameie,DC=COM’ -ResultSetSize $null | Measure-Object >c:\tmp\object_dump.txt

This will dump the information into a easy to read text file

object_count_output.PNG

Now you know how many Objects you have.