
How to count number of objects in active directory
Post Views: 347
How to count number of objects in active directory
How to count how may objects in AD? How many users, computers and group?
Due to compliance or Asset/inventory/License management purpose we always need a count of system we have in our environment. If you are running Microsoft Windows platform and has Active Directory environment. So, best solution is “Get-AD” power-shell command.
Commands are:
(Get-ADUser -Filter *).Count
(Get-ADGroup -Filter *).Count
(Get-ADComputer -Filter *).Count
(Get-ADObject -SearchBase "cn=Configuration,dc=mydomain,dc=com" -LDAPFilter "(objectClass=site)").Count
(Get-ADObject -SearchBase "dc=Mydomain,dc=com" -LDAPFilter "(objectCategory=*)").Count
Related Posts
- What's New in Active Directory in Windows Server 2012
What's New in Active Directory in Windows Server 2012 The enhancements to Active Directory in…
- Authoritative vs Non-Authoritative Restoration of Active Directory
Authoritative vs. Non-Authoritative Restoration of Active Directory It is the absolute worst case scenario possible;…
- How to add user in windows through command
How to add user in windows through command We always get requirement to add…
Active Directory Interview questions with answers
[…] How to count number of objects in active directory […]