PowerShell Script – View All Users And Their Target Address

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
083115_0430_PowerShellS1.png

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


Posted

in

,

by

Comments

One response to “PowerShell Script – View All Users And Their Target Address”

  1. Jose Colmenares Avatar
    Jose Colmenares

    If I dont need all users of AD, only a few that exist in .csv file? How can i do?