• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 96
  • Last Modified:

active directory

I need to get a count of objects in active directory. Total objects, then a count of just user identities (all authentication accounts).
0
pramod1
Asked:
pramod1
2 Solutions
 
Joseph MoodyBlogger and wearer of all hats.Commented:
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
 
Austin TexasSystems EngineerCommented:
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
 
pramod1Author Commented:
how can I out put Get-ADObject -Filter *) to  a txt file , I need to have count
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
(Get-ADObject -Filter *).count | out-file .\count.txt
0
 
SubsunCommented:
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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now