Solved

script to export Username to a CSV format from AD

Posted on 2008-10-04
2
567 Views
Last Modified: 2012-06-27
MY AD is having almost 25,000 users in different departments. I need the user name and password , display name and the department name from my Active directory, I need to export to a .csv format . Later i need to import to windows live (for -email creation)

Can anyone come up with a script  or tool which will allow me to export a list of user name, password , display name and Department from my AD to a .csv format
0
Comment
Question by:mishalk
[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
2 Comments
 
LVL 14

Expert Comment

by:igor-1965
ID: 22641385
Password?????
0
 
LVL 31

Accepted Solution

by:
Henrik Johansson earned 250 total points
ID: 22641482
Password can't be exported because it's encrypted.

Use CSVDE-command like below. Any attribute listed in -r parameter must match and if using displayname=* means that it cannot be empty.
If you want the usenrame@domain instead of just username, replace the attribute samaccountname in -l parameter with userprincipalname.

C:\>csvde -f export.csv -r "(&(objectclass=user)(samaccountname=*)(displayname=*))" -l "samaccountname,displayname,department"

See csvde /? for help on the command.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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