Forum Discussion
Manage Cloud Created Mailboxes/User On-Prem
So, ive figured it out, and the following will provide the answer to anyone else with the same scenario:-
Okay, so, the process isn't too difficult (once you figure it out). Here are the details:-
Use powershell to set up a remote pssession to M365:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
Then get the mailbox details of the user(s) using something like this:-
get-mailbox | select name,primarysmtpaddress,exchangeguid,isdirsynced
You can play with the get-mailbox selection criteria – the ‘isdirsynced’ is useful as it allows to filter based on whether the user is from on-prem or not..
Once we have this list – suggest you export to a csv. You can then run the following using the on-prem exchange powershell – reading in the csv and using the fields as variables maybe. The basic commands are:-
Enable-RemoteMailbox username -RemoteRoutingAddress mailto:emailaddress@XXXXXXX
Set-RemoteMailbox username -ExchangeGuid <ExchangeGuid>
Once these commands have been run the O365 mailbox will show up on your on-prem ECP and function in the expected manner.