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 "https://ps.outlook.com/powershell/" -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

Leave a comment

Your email address will not be published. Required fields are marked *