Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 538
  • Last Modified:

VB Script that pulls all Usernames from all OU's in Active Directory.

Hello I am looking for a way to pull all users from all OU's in active directory and was wondering if anyone had a VBScript that they would be willing to share.  Any help would be appreciated thanks.
0
Don Coleman
Asked:
Don Coleman
  • 3
  • 3
1 Solution
 
McKnifeCommented:
The question will be "what should the output look like?".
A simple batch command "net user" will do when executed at a domain controller.
0
 
Don ColemanOwnerAuthor Commented:
Sorry meant to put that in the question I would like it to output to a txt or a csv file if possible thanks.
0
 
McKnifeCommented:
no, I mean, is the layout of the output of any importance?
See, for example
net user >%temp%\users.txt
 will produce a textfile with 3 columns.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
Don ColemanOwnerAuthor Commented:
I would prefer just one column I only need the username but 3 columns will work if not possible to do 1.
0
 
McKnifeCommented:
Well, I cannot figure out a script to get one column from net user, so take the command
dsquery user
that produces one column.
0
 
Don ColemanOwnerAuthor Commented:
Ok thanks for the help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

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

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