I need to see all remote-mailboxes that have an address other than *.mail.onmicrosoft.com. Here is what I tried to use but its only showing those that have the .mail.onmicrosoft.com. and not what I need.
Get-remotemailbox -resultsize unlimited | where-object {$_remoteroutingaddress -notlike "*.mail.onmicrosoft.com"}
using this command seems to be only showing the ones that have .mail in the routing address.
Thanks
STE
Stephen Ellis