Skip to main content

Posts

Showing posts from May, 2023

Check if you have users with both mailboxes on-prem and online

An Exchange Online license was applied to the user before the Exchange GUID got synchronized from on-premises Active Directory. For synchronized accounts, having the Exchange GUID synchronized from on-premises is used to tell Exchange Online that the mailbox hasn’t been migrated yet, and is what allows customers to pre-license accounts prior to migration.  From:  My user has a mailbox both on-premises and in Exchange Online. So, in my case many times we get into situation where license is applied before Exchange GUID is synchronized to O365. I am using this script to check whether user has two mailboxes. Script closes Exchange session BEFORE it opens connection to Exchange Online as both use same commands. You can use Get-Mailbox both on-prem and Online, therefore it is crucial to close connection before you open other. # DISCLAIMER: # This code is provided "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of