Solved

active directory

Posted on 2016-10-24
5
46 Views
Last Modified: 2016-10-24
I need to get a count of objects in active directory. Total objects, then a count of just user identities (all authentication accounts).
0
Comment
Question by:pramod1
5 Comments
 
LVL 22

Expert Comment

by:Joseph Moody
ID: 41857065
You can use the powershell command: (Get-ADObject -Filter *).count to get a count of all ad objects. Change Get-ADObject to Get-ADUser to get a count of all AD users.
0
 
LVL 5

Expert Comment

by:Austin Texas
ID: 41857066
You can pipe the results of "dsquery user" to a text file and then drop that in excel to get a count of user objects in your AD.

An alternative tool would be joeware's ADFIND. This example will display the number of user accounts in the "domain.com" domain.
adfind -b "dc=domain,dc=com" -f "objectcategory=person" -c

Open in new window

0
 

Author Comment

by:pramod1
ID: 41857075
how can I out put Get-ADObject -Filter *) to  a txt file , I need to have count
0
 
LVL 22

Accepted Solution

by:
Joseph Moody earned 250 total points
ID: 41857081
(Get-ADObject -Filter *).count | out-file .\count.txt
0
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 250 total points
ID: 41857084
To get object count
(Get-ADObject -Filter * | Measure).Count

Open in new window

To get user count
(Get-ADUser -Filter * | Measure).Count

Open in new window

To get count for each ObjectClass
Get-ADObject -Filter * | Group ObjectClass | Select Name,Count

Open in new window

Not sure, what you mean by  'all authentication accounts'.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
Synchronize a new Active Directory domain with an existing Office 365 tenant
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now