Bulk add alias name by using script
Before we can run the script, we need to connect to exchange online powershell. Set-ExecutionPolicy RemoteSigned$UserCredential = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirectionImport-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagementUpdate-Module -Name ExchangeOnlineManagement ————- add alais name to email ————– Import-CSV “D:\RemoveAlias.csv” | ForEach {Set-Mailbox $_.OldEmailAddress -EmailAddresses @{add=$_.NewEmailAddress}} ————- remove alais name from email
Read More