Solved

active directory

Posted on 2016-10-24
5
58 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
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 to another domain controller. Log onto the new domain controller with a user account t…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

776 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