Skip to content

Instantly share code, notes, and snippets.

@burn2delete
Created February 25, 2015 19:54
Show Gist options
  • Save burn2delete/d4b8675d9346d6ca7288 to your computer and use it in GitHub Desktop.
Save burn2delete/d4b8675d9346d6ca7288 to your computer and use it in GitHub Desktop.
Update the Office365 Email (proxyAddress) to match UPN
$cred = Get-Credential
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $session
Get-Mailbox -Filter * | ForEach-Object {Set-Mailbox -Identity $_.UserPrincipalName -WindowsEmailAddress $_.UserPrincipalName -Verbose}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment