Reg:: Office-365 Exchange users backup with email aliases

Hi PowerShell Experts,

One of my customer requested the followed task, Could you please help me.

Request: Needed Backup of Office-365 users with email aliases.

Description: Customer requested us, they needed csv file of office-365 users with email aliases.

Many Thanks,

Madhu

May 22nd, 2015 2:59am

get-mailbox | select alias,primarysmtpaddress | export-csv backup.csv

The rest is up to you.

Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2015 3:37am

Hi Jrv,

Greetings!!

The followed suggested snippet is doing export of users alias name and Primary smtp address. We need to backup users secondary email address too.

Snippet: get-mailbox | select alias,primarysmtpaddress | export-csv backup.csv

Could you please help me...

Best Regards,
Madhu

May 22nd, 2015 6:18am

Hi Madhu,

To export the secondary email address, please refer to the script below:

Get-Mailbox -ResultSize Unlimited |
Select-Object DisplayName,ServerName,PrimarySmtpAddress, `
@{Name=EmailAddresses;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq smtp} |
 ForEach-Object {$_.SmtpAddress}}}| Export-Csv c:\backup.csv

If there is anything else regarding this issue, please feel free to post back.

Best Regards,

Anna Wang


Free Windows Admin Tool Kit Click here and download it now
May 26th, 2015 5:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics