E=mc2
asked on
List all email addresses in Exchange 2010 including any forward emails
I need to modify the following scripts so that any emails which have forwards associated with them will also be shown:
Get-recipient -resultsize unlimited | select Name -expand emailaddresses | Select SmtpAddress
or
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,Pri marySmtpAd dress, @{Name=“EmailAddresses”;Ex pression={ $_.EmailAd dresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}} > C:\Addresses\emailaddresse s.txt
or
Get-recipient -ResultSize Unlimited |Select-Object DisplayName,ServerName,Pri marySmtpAd dress, @{Name=“EmailAddresses”;Ex pression={ $_.EmailAd dresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}} | Export-Csv c:\mailbox_alias.csv
Get-recipient -resultsize unlimited | select Name -expand emailaddresses | Select SmtpAddress
or
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,Pri
or
Get-recipient -ResultSize Unlimited |Select-Object DisplayName,ServerName,Pri
ASKER
Is this an Exchange script? If yes, how to you run it?
Yes, its a script that need to be run from "Exchange Management Shell"Copy the script into a notepad and "Save as" name it as u like but put the name in quotes "" with file extension as ".ps1"Using Exchange Management Shell, browse to the directory where you saved the file and type .\Get-ForwardingAddress.sp 1
Note that the output will seen in EMS as well as .csv file will be saved on C drive.
You can change the path in the very last line of script.
Note that the output will seen in EMS as well as .csv file will be saved on C drive.
You can change the path in the very last line of script.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Might work, I need to ask a question.
Tested it in my environment and the results are as expected, give output on screen as well in a csv format which includes Name, Alias and forward Address associated to each account.
Hope it help.
Open in new window