Export AD users from perticular distribution group

I am new to VB scripting and dont know even basics, could someone provide me VBscript which should export active directory users from perticular group with specific attributes into .csv or txt file. Thanks
tech2010Asked:
Who is Participating?
 
Chris DentConnect With a Mentor PowerShell DeveloperCommented:
0
 
Krzysztof PytkoSenior Active Directory EngineerCommented:
type on server on workstation with Administrative Tools installed in command-line

dsquery group -name <group_name> | dsget group -members -expand | dsget user -fn -ln -samid -email -desc >c:\users.txt

It will export users from specified groups with First Name, Last Name, login, e-mail address (if specified) and description to C-drive onto users.txt file.
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
tech2010Author Commented:
the reason i want to do this via vbscript because i want to include some customized column in to output file. is there any sample or quick / easy script available?
0
 
Chris DentPowerShell DeveloperCommented:

Hey there,

You could do far worse than pick up PowerShell for this one, if you get this:

http://support.microsoft.com/kb/968930

And this:

http://www.quest.com/powershell/activeroles-server.aspx

Then all you need run is:


Get-QADGroupMember "Your Group" | Select-Object Name, Description, Title | Export-Csv "SomeFile.csv" -NoTypeInformation


The Select-Object statement picks up the fields you might be interested in, if you need more, less or something entirely different then just yell.

Chris
0
 
tech2010Author Commented:
Is there any GUI tool available which generate vbscript on the basis of what options we specify in the tool?
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.

All Courses

From novice to tech pro — start learning today.