Solved

Export Active Directory Users

Posted on 2014-12-08
7
269 Views
Last Modified: 2014-12-10
Hello,
How can I bulk export many users from AD into a CSV file with these attributes?
first name, last name, login and email address.

Is there a program, tool or maybe powershell? How do I select the users needed?
Thanks.
0
Comment
Question by:tolinrome
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 1

Accepted Solution

by:
Ryan Rood earned 500 total points
ID: 40488141
This is the script that I use to export users from PowerShell. I believe it includes all of the fields you require and has the formatting to export to excel. This dumps ALL users to excel and then I filter from there depending on what I am looking for.

# To Export
Get-ADUser -Filter {(Name -notlike "*(Administrator)")}  -Properties SamAccountName,GivenName,Surname,Description,DisplayName,Company,Department,Office,EmailAddress,OfficePhone,Mobile,Fax,StreetAddress,City,State,PostalCode,Country,LogonWorkstations,HomePage,Title,Manager,Enabled | Select-Object SamAccountName,GivenName,Surname,Description,DisplayName,Company,Department,Office,EmailAddress,OfficePhone,Mobile,Fax,StreetAddress,City,State,PostalCode,Country,LogonWorkstations,HomePage,Title,Manager,Enabled | export-csv -path c:\temp\ADUsersExported.csv -NoTypeInformation -Encoding "UTF8"
1
 
LVL 7

Author Comment

by:tolinrome
ID: 40488143
That seems pretty good. Ok, so just paste that above into a .PS1 file and run it from the Domain Controller?
0
 
LVL 1

Expert Comment

by:Ryan Rood
ID: 40488144
You can paste it right into PowerShell. I generally use the Active Directory Module for Windows PowerShell when wanting data from Active Directory.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 5

Expert Comment

by:Dilip Patidar
ID: 40488169
Hello,

Please refer the below URL. you can export the Users and Group in various format...

https://4sysops.com/archives/export-active-directory-users-with-powershell/

Thanks,
Dilip Patel
0
 
LVL 12

Expert Comment

by:Mahmoud Sabry
ID: 40488315
use the attached script
Export-Users-To-Excel.vbs
0
 
LVL 12

Expert Comment

by:Mahmoud Sabry
ID: 40488317
and u can select the fields you need from the excel file
0
 
LVL 7

Author Closing Comment

by:tolinrome
ID: 40492082
That worked great. Thanks.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

920 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

11 Experts available now in Live!

Get 1:1 Help Now