This KB will show you how to view all Users In Active Directory and their Target address.
You will need to run the script from a server running windows server 2008 R2 and above with the Active Directory tools Installed.
This script Is very handy when doing cross forest migration or migrating to Office 365
Import-module activedirectory Get-ADUser -Filter * -Properties targetaddress | select name, targetaddress
To export to a CSV file use:
Import-module activedirectory Get-ADUser -Filter * -Properties targetaddress | select name, targetaddress | Export-Csv c:\Targetadress.csv -NoTypeInformation
If you need to Export All your Office 365 Users Proxy Addresses check my article Export All Office 365 Users Proxy Addresses To A .CSV File
Comments
One response to “PowerShell Script – View All Users And Their Target Address”
If I dont need all users of AD, only a few that exist in .csv file? How can i do?