If you have a hybrid email config where some mailboxes resides in MS365 cloud and some in on-premises systems, and you want to keep it like this for different reasons, it is possible to setup an Outbound Connector from MS365 and relay messages through 365.
This can be done in Powershell using Connect-Exchangeonline and the commands:
If we have different domain names, this will still work if you add the domain to MS365 and add mail-contacts with the emailaddresses you want to redirect.
If you are using GUI there’s a validation step upon creating the outbound connector. This will fail if you have changed the DNS MX records to 365, thus can be skipped and the connector will still be created
Some advantages of this config is logging capabilites and Antivirus/Antispam features, EOP, and a buffer in form of a “pending” status on the queue if on-premises is down.
Exchange Online Protection (EOP) is a part of 365 standard Online license, and can also be purchased as a standalone product.
More on the subject of connectors here https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail
BTW, you need a list of all the Powershell commands for Exchange Online module?
get-command -module exchangeonlinemanagement
-no this only returns a couple.
You need to do this:
get-pssession | select *
Look at the “Currentmodulename”
You can see that it has taken a list of commands available on the remote server, and pulled them into a temporary/virtual module.
So we want to view the commands in this temp module like this (example):
get-command -module tmp_fvlghxau.fyk
At the time of writing there are 704 commands in the ExchangeOnline module