[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

How to import users from a Activedirectory OU.

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
lianne143
Asked:
lianne143
2 Solutions
 
oBdACommented:
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
 
Todd NelsonSystems EngineerCommented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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