How to add or remove an email alias using Powershell
Open Power Shell as an Administrator
Go to Start
Search for Power Shell
Right click on Windows Power Shell
Run as Administrator
Run the following commands
Set-ExecutionPolicy RemoteSigned
(Need to configure this setting only once on your computer)
-Press “A” or “Y”
–Press Enter
$UserCredential = Get-Credential
Windows Power Shell Credential Request
Enter Admin’s Username & Password
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
Add an email alias to an Office 365 account
Set-Mailbox "User's Name" -EmailAddresses @{Add='alias@yourdomain.com'}
Remove an email alias from an Office 365 account
Set-Mailbox "User's Name" -EmailAddresses @{Remove=’alias@yourdomain.com’}
If you are using MFA (multi-factor authentication) follow this link
Connect to Exchange Online Power Shell using multi-factor authentication
Best and easy way.
Worked like a charm