- Start PowerShell as an Administrator
- If you haven't before issue the command issue it now: Set-ExecutionPolicy RemoteSigned
- Connect PowerShell to Office365 - (from http://technet.microsoft.com/en-us/library/jj984289(v=exchg.150).aspx)
- Issue the command and input your credentials: $UserCredential = Get-Credential
- Then issue this command to connect: $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
- Import the PowerShell commands from the Exchange Server by issuing: Import-PSSession $Session
- Now test your connection by issuing: Get-Mailbox and making sure you get output.
- https://www.cogmotive.com/blog/office-365-tips/create-shared-mailboxes-with-same-alias-at-different-domains-in-office-365 gives us the following steps
- : New-Mailbox -Name "Test Shared Mailbox 2" -Alias test_shared2 -Shared -PrimarySMTPAddress test_shared@cogmotivereports.com Be certain to replace "Test Shared Mailbox 2" with the desired display name, the alias "test_shared2" with the desired alias (prefix before the @ sign) and fix the primary SMTP address with the desired address.
- Next correct the login name for this mailbox - set-mailbox test_shared2 -MicrosoftOnlineServicesID test_shared@cogmotivereports.com - you may receive the following error WARNING: UserPrincipalName "test_shared1@cogmotivereports" should be same as WindowsLiveID "test_shared@cogmotive.onmicrosoft.com", UserPrincipalName should remain as"test_shared1@cogmotivereports". Which may be safely ignored.
- Check you work by issuing Get-Mailbox verifying that the new mailbox entry appears.
- Close your session with Remove-PSSession $Session
This will create a new shared mailbox with the desired alias. To make certain users send from the desired address and not the placeholder alias (test_shared2) sign into Exchange and go to the shared mailbox. Edit the email addresses and set the desired alias as the primary address.