On scom 2016 monitoring server below alert was raised for some mailboxes on Exchange 2016. Exchange 2016 is hybrid configured Exchange Online, and mailbox moves are done frequently between on-premise and Exchange Online.

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: d56be174-5c84-40d5-b5d8-32470b3f5d93 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.

My client had a few mailboxes moved from Office365 to On-premise Exchange with exchange online archiving still active on them, but the on-premise exchange mailbox servers are not internet facing. Proxy is used on them.

So, If you run the command suggested by SCOM

Export-MailboxDiagnosticLogs -Identity Mailboxname -ComponentName MRM

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

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

You can verify an on-premise mailbox who has exchange online archiving enabled using these commands as shown on Microsoft docs: –

note the archiveguid and archivename properties

since my exchange servers are not internet facing, exchange online archiving on-premise will not work as intended, and as such I get hit with the error ArchiveExchangeWebServiceNotAvailable.

Further digging on the matter, I found below articles one from Microsoft support and another reported by someone who faced similar error, article on technet:- ELC EWS failed with error type: ‘ArchiveExchangeWebServiceNotAvailable’ (,

The article from Microsoft support is pretty clear on why you have error:-

You configure a server that is running Exchange Server to use a proxy to connect to Office 365 (without a direct access).

This issue occurs because the web proxy is not set when the server that is running Exchange Server tries to connect to Office 365. Therefore, the cloud-based archive mailbox cannot be found by Exchange Server, and MRM stops processing the mailbox.

in conclusion you need to enable firewall direct access from your exchange server to exchange online port 443 for exchange online archiving to function properly. Depending on your situation if you rather want to use on-premise mailbox exchange online archiving you will have to follow documentation on Microsoft docs to have it running properly, in my case we don’t have a need for that. I hope this article helps you out.

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.