Solved

active directory

Posted on 2016-10-24
5
78 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 6

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

626 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