Hybrid scenario – customer moved mailboxes and didn’t
license them.
Pre-req of MSOL and EXO shell loaded in the same instance - super easy with my script!
$msol = get-msoluser
-all | where { $_.isLicensed -eq $true }; $mbox = get-mailbox -ResultSize
5555555; Compare-Object -ReferenceObject $msol.userprincipalname
-DifferenceObject $mbox.userprincipalname
Output options:
-excludedifferent
-includeequal
Sample output (neither output option shows just the delta
items)
InputObject
SideIndicator
-----------
-------------
user1@contoso.com
=>
user2@contoso.com
=>
user3@contoso.com
=>