Hello and welcome to CertForums.co.uk, here we host free active certification forums with links to the best free resources for Microsoft's MCSA MCSE MCDBA Cisco's CCNA CCDA and CCNP, and CompTIA's A+ Network+ i-NET+ and Security+ certifications in the UK. If you wish to post or use other advanced features you will need to register first. Registration is absolutely free and takes only a few minutes to complete so sign up today!

If you have any problems with the registration process or your account login, please contact support

Go Back   CertForums > Certification Forums > Microsoft Certification Forums > Active Directory Exams
Home Forums Register Search Today's Posts Mark Forums Read

how to work out number of users/comps in AD

Post New ThreadReply
 
Thread Tools Display Modes
  #1  
Old 27-Jul-2008, 03:32 AM
thetokyoproject thetokyoproject is offline
Valued Member
Posts: 116
Points: 0 thetokyoproject has no points
Power: 6
None
Join Date: 02 Oct 2006
Certifications: 271
WIP: linux+
how to work out number of users/comps in AD

just wanted to know how to work out how many active users and computers there are in a domain via AD?

Cheers.

 
Reply With Quote
  #2  
Old 27-Jul-2008, 03:44 AM
Mr.Cheeks's Avatar
Mr.Cheeks Mr.Cheeks is offline CertForums News Posting Member
Soz Hun I have a headache
Posts: 4,817
Points: 2647 Mr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 pointsMr.Cheeks has over 2500 points
Power: 80
None
Join Date: 23 Feb 2006
this works in a workgroup, unsure bout domain and AD querying
start > run >
net users /domain >filename.txt

best thing is to search the net for a vb script


RIP Dave - You will never be forgotten!
Another good post?
If so, tell a friend, if not, f*ck off then!


 
Reply With Quote
  #3  
Old 27-Jul-2008, 04:24 AM
Theprof's Avatar
Theprof Theprof is offline
Lifetime Member
Posts: 2,400
Points: 1168 Theprof has over 1000 pointsTheprof has over 1000 pointsTheprof has over 1000 pointsTheprof has over 1000 pointsTheprof has over 1000 pointsTheprof has over 1000 pointsTheprof has over 1000 pointsTheprof has over 1000 pointsTheprof has over 1000 points
Power: 40
None
Join Date: 20 May 2006
Location: Canada
Certifications: 270, A+, MCDST, Network+
WIP: Bachelors in Business, MCSA
Have you tried using the DSQuery command? this website gives some examples as to how to use the command. Also there are plenty of resources on the technet site about this type of stuff.


My best memories go out to nights that turned into mornings and the friends that turned into family.

Whatever the mind can conceive and believe, the mind can achieve. Dr. Napoleon Hill

Do just once what others say you can't do, and you will never pay attention to their limitations again. James R. Cook


 
Reply With Quote
  #4  
Old 27-Jul-2008, 08:24 AM
NightWalker's Avatar
NightWalker NightWalker is offline
Lifetime Member
Posts: 1,124
Points: 1088 NightWalker has over 1000 pointsNightWalker has over 1000 pointsNightWalker has over 1000 pointsNightWalker has over 1000 pointsNightWalker has over 1000 pointsNightWalker has over 1000 pointsNightWalker has over 1000 pointsNightWalker has over 1000 points
Power: 28
None
Join Date: 04 Apr 2005
Location: Devon, UK
Age: 30
Certifications: A+, Network+, MCP, MCSA:M 2003
WIP: Active Directory 70-294
Yep, dsquery is the best way.


A+, N+, MCP, MCSA:Messaging 2003 (70-270, 284, 290, 291, 293).
Microsoft Course 2576 - IIS 6.
Blackberry Course - Administering BES 4.1.5 (Part 1 & 2).

CPU: C2D E6600 @ 3.3 Ghz
HSF: Zalman CNPS9500A-LED
Mobo: Asus P5K Premium-Black Pearl
Ram: Corsair Dominator DDR2 2x1GB 1066MHz
GPU: Asus EN8600GT DX10
HD: OS = 1xWD1600YS
HD: Data = 3xWD1600JS RAID5
PSU: Hiper Type-R 530W
Case: Thermaltake VC3000BWS
Display: Samsung 2232BW


 
Reply With Quote
  #5  
Old 27-Oct-2008, 11:06 AM
Obinna Osobalu's Avatar
Obinna Osobalu Obinna Osobalu is offline
Valued Member
Posts: 390
Points: 29 Obinna Osobalu has between 1 & 100 points
Power: 4
None
Join Date: 17 Oct 2008
Location: Abuja, Nigeria.
Age: 26
Certifications: MCTS:VISTA; MCSE 2003; MCSA 2003:M; MCP
WIP: MCITP:Server Admin 2008
Quote:
Originally Posted by thetokyoproject View Post
just wanted to know how to work out how many active users and computers there are in a domain via AD?

Cheers.

The DSQUERY command queries Active Directory for objects that match a specific criteria
set. The command’s basic syntax is:

dsquery object_type [{StartNode | forestroot | domainroot}] [-o {dn | rdn | samid}] [-scope {subtree | onelevel | base}] [-name Name] [-desc Description] [-upn UPN] [-samid SAMName] [-inactive NumberOfWeeks] [-stalepwd NumberOfDays] [-disabled] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}]

Keep in mind, this command will often be used to generate a list of objects against which you will run other command-line utilities. This is accomplished by piping the output to the second command. For example, the following command line queries Active Directory for a user object with a name starting with “Dan,” pipes the result set to DSMOD, which disables each object in the result set: dsquery user -name Dan* | dsmod user -disabled yes The other utilities accept DNs as their input, which is the default output type as well.

But then a VBscript(you can get that on the net, just google it!) will be much easier because you wont have to deal with the syntax.

 
Reply With Quote
Post New ThreadReply Spread this thread: Submit this thread to digg Submit this thread to del.icio.us


Go Back   CertForums > Certification Forums > Microsoft Certification Forums > Active Directory Exams


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What qualifications can I work towards Graceful Dave Training & Development 4 30-May-2008 12:02 PM
Work Placements- Any Ideas pauldb Training & Development 4 22-Oct-2007 03:44 PM
Should I include my previous work experience on my resume? Professor-Falken Employment & Jobs 9 01-Aug-2007 09:20 PM
Seeking work in the USA (12 month migration from the UK) mjtibbs Employment & Jobs 4 23-Jul-2007 03:19 AM
Seems I've won 500k Bambino1506 The Lounge - Off Topic 7 26-Jun-2007 12:37 PM


All times are GMT +1. The time now is 06:17 AM.

Powered by vBulletin® Version 3.6.11
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
CertForums.co.uk (C) copyright 2003-2007 All Rights Reserved. Content published on CertForums.co.uk requires permission for reprint.
Hosted by Lunarpages