Office 365 – Export Addresses List CLI

Run Powershell as admin

First, Connect with your credentials:

$AdminUsername = "[email protected]"
$AdminPassword = "Password"
$SecurePassword = ConvertTo-SecureString $AdminPassword -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $AdminUsername,$SecurePassword


Create a new session:

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "" -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $Session


Run this command to export all existing addresses on your mailbox account:

Get-Recipient -ResultSize Unlimited | select DisplayName,RecipientType,EmailAddresses | Export-Csv -path C:\addresses-list.csv


If you have done successfully, Exit the CLI:

Remove-PSSession $Session