Microsoft.Exchange.MailboxAssistants.Assistants.ELC.ElcEwsException.ArchiveExchangeWebServiceNotAvailable – error after offboarding user mailbox from exchange online to onpremis

On SCOM monitoring server below alert was raised for some user mailboxes on Exchange 2016 on-premise server. In this case, Exchange 2016 is hybrid configured, and some users offboarded from exchange online back to exchange on-premise.

Full alert description from SCOM:-

Probe: {Compliance/ELCComponent_LastSuccessTooLongAgo}
Mailbox guid: {d5xxe174-xxxxxx-b5d8-324xxxx5d93}
In Org: {}
Is archive: {IsArchiveMailbox = False}
With stack trace: {The difference: 7.89530321780208 days between today: 11/26/2021 8:41:11 AM and the date of last successful ELC run: 11/18/2021 11:11:57 AM for mailbox: d5xxe174-xxxxxx-b5d8-324xxxx5d93 is above the threshold: 7; Exception message: Microsoft.Exchange.MailboxAssistants.Assistants.ELC.ElcEwsException.ArchiveExchangeWebServiceNotAvailable.}
Get last ELC exception from Export-MailboxDiagnosticLogs -Component MRM then statistics with -ExtendedProperties and look at all ELC properties, specifically the value of ELCLastSuccessTimestamp. If mailbox is Archive use -Archive.

In my case, a few user mailboxes were offboarded from exchange online to on-premise Exchange 2016 with exchange online archiving still active on those mailboxes and the on-premise exchange servers are in DMZ, not internet facing.

If you run the command suggested by SCOM in the alert details:-

Export-MailboxDiagnosticLogs -Identity Mailboxname -ComponentName MRM

You will see the full error, and look closely at the exception warning:-

ELC EWS failed with error type: ‘ArchiveExchangeWebServiceNotAvailable’. Message: Archive EWS url is unknown.

Next, you can verify the on-premise user mailbox who has exchange online archiving enabled on Exchange online using these commands

Get-Mailbox <on-premises user mailbox> | FL *archive*

Full list of commands:-

Take note of the populated mailbox ArchiveGuid and ArchiveName, ArchiveStatus properties

Microsoft says the only supported archive split scenario is a primary mailbox on-premises and an archive mailbox in Exchange Online. (

For me, we did not need to have exchange online archiving enabled for the on-premise users, we followed the steps Scenerio 5 with provided script to cleanup


If you have the user primary mailbox seated on-premise and its archive mailbox seated in exchange online and your on-premise exchange servers are on DMZ i.e not internet facing, then:-

  • You will face this error on your dmz exchange if you don’t use a web proxy or proxy firewall is not configured to allow exchange on-premise server to connect to exchange online on port 443, so talk to your network admin, make sure your dmz exchange can reach exchange online.

Lastly, if non of the above scenarios applies to your case, Microsoft provides resolution to several other scenarios, in the link of this documentation (

  • Scenario 1 – Onboarding: You move your on-premises Microsoft Exchange Server mailboxes to Exchange Online.
  • Scenario 2 – Onboarding: Your archive mailbox exists in Exchange Online, and you move your primary mailbox from your on-premises Exchange Server environment to Exchange Online.
  • Scenario 3 – Offboarding: You enable an archive mailbox and then migrate both your primary and archive mailboxes from Exchange Online to your on-premises Exchange Server environment. A similar scenario occurs when your primary mailbox is already on-premises and you decide to offboard your archive mailbox from Exchange Online to your on-premises Exchange Server environment.
  • Scenario 4 – Offboarding: Your primary mailbox does not have an archive mailbox enabled, and you move your primary mailbox from Exchange Online to your on-premises Exchange Server environment.
  • Scenario 5 – Offboarding: Your primary mailbox exists in your on-premises Exchange Server environment, and your archive mailbox exists in Exchange Online. This scenario may occur when you take one of the following actions:
    • You offboard your primary mailbox. However, you leave your archive mailbox in Exchange Online.
    • Both primary and archive mailboxes are located in your on-premises Exchange Server environment. However, you onboard only your archive mailbox.

Powershell command to quickly check licenses assigned to an Office365 user – Office365

Today I will share with you my powershell command I use to quickly know what licenses are provisioned for a user in office365. It’s faster and saves the time to do it via the admin panel.

First you will need to have Microsoft Azure Active Directory Module installed for your windows powershell. You only need to do this once if you don’t already have this module installed.

To download this Module for your powershell,  here is the OS requirements:-

  • Windows 10, Windows 8.1, Windows 8 or Windows 7 Service Pack 1 (SP1)
  • Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2 SP1

Follow the steps here to install it:-


Connect to Azure AD for your office365 subscription:-

  1. In your powershell screen enter the below commands:-

$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential

Type your Office 365 Administrator account user name and password, and then click OK. Now you are ready to check user license.

2. Enter the following command:-

(Get-MsolUser -UserPrincipalName


You can now see the service plans and licenses assigned to the user.