Export (0) Print
Expand All
3 out of 8 rated this helpful - Rate this topic

Counting Objects in Active Directory

Updated: February 28, 2009

Applies To: Windows Server 2008 R2

This topic explains how to use the Active Directory module for Windows PowerShell to retrieve the total number of objects that are stored in the Active Directory database.

The following example demonstrates how to retrieve the total number of objects that are stored in the Active Directory database of the Fabrikam.com domain:

Get-ADObject -Filter {name -like '*'} -SearchBase 'CN=Schema,CN=Configuration,DC=Fabrikam,DC=COM' -ResultSetSize $null | Measure-Object

For a full explanation of the parameters that you can pass to Get-ADObject or Measure-Object, at the Active Directory module command prompt, type Get-Help Get-ADObject –detailed or Get-Help Measure-Object, and then press ENTER.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.