Solved

script to export Username to a CSV format from AD

Posted on 2008-10-04
2
566 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
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

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

Title # Comments Views Activity
Connecting two servers 30 82
2003 File Server upgrade 11 62
How to restore security permissions on a file server 4 54
Excel 2016 loop through 6 36
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

785 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