Use the Get-AdUser Cmdlet to export a CSV list that includes DistinguishedName, EmailAddress, and ObjectGUID. Depending on the size of your active directory and your filter properties, this command may cause a noticeable impact on your AD Server. Please take caution. An example command would be:
Get-ADUser -Filter * -Properties DisplayName,emailaddress | export-csv 'ad_users.csv'
This command can be run in two different ways:
1) Through Powershell on a Windows server configured with an AD role.
2) Or on a windows 7 workstation connected to the Domain after installing "Remote Server Administration Tools"
- Install Remote Server Administration Tools
- Open Control Panel -> Programs and Features -> Turn On/Off Windows Features
- Find "Remote Server Administration Tools" and expand it
- Find "Role Administration Tools" and expand it
- Find "AD DS And AD LDS Tools" and expand it
- Check the box next to "Active Directory Module For Windows PowerShell".
- Click OK and allow Windows to install the feature
- Run the following code in a PowerShell terminal.
- The first line will load the AD module. (Make sure your user account has sufficient privileges)
- The second line will get all the AD users, along with their name and email address, and save it as a CSV file.
import-module activedirectory
Get-ADUser -Filter * -Properties DisplayName,emailaddress | export-csv 'ad_users.csv'
Importing into SafeConsole
To import, go to Manage Users and click the import button. A popup will ask you to Upload your CSV file and specify the formatting.
After importing, a hard refresh might be required before the Users show up.