Solved

How to import users from a Activedirectory OU.

Posted on 2016-09-06
2
37 Views
Last Modified: 2016-09-13
Hi

We have Windows 2012 DC and we have a OU where 200 users are created. I want to export their full name , user name and password.
I have used CJWDEV AD info Free Edition in the past and completely forgot how to import users from specific OU.

Please can you post me , if there is any Free tool to do this .

Thanks
0
Comment
Question by:lianne143
2 Comments
 
LVL 82

Accepted Solution

by:
oBdA earned 250 total points
ID: 41785666
Powershell:
Get-ADUser -Filter * -Properties DisplayName -SearchBase 'OU=SomeOU,OU=Wherever,DC=domain,DC=com' |
	Select-Object -Property DisplayName, SamAccountName |
	Export-Csv -Path C:\Temp\ADUsers.csv -NoTypeInformation

Open in new window


You can't export their passwords, nor is there any need for anyone to know anybody else's password.
0
 
LVL 14

Assisted Solution

by:Todd Nelson
Todd Nelson earned 250 total points
ID: 41786202
Like OBDA said, you cannot export passwords.

Other than that, you will to get what you want with CSVDE (run from CMD prompt).  Try something like this...

csvde.exe -d "ou=MYOU,dc=MYDOMAIN,dc=local" -r objectClass=user -l DisplayName,userPrincipalName -f user-objects.csv

Open in new window

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Understanding the various editions available is vital when you decide to purchase Windows Server 2012. You need to have a basic understanding of the features and limitations in each edition in order to make a well-informed decision that best suits y…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now