The following error might occur in ExchangeExchange Online Hybrid User Configuration, Exchange Online Hybrid Mailbox Configuration, or Office 365 User Subscription Configuration collection job.
09/11/2020 01:00:04: Warning: Exchange Online PowerShell operation failed [Username: <emailAddress>]. Will try again in 120 seconds: One or more errors occurred. First error: Prerequisite not found: Please make sure both 1) Microsoft Online Services Sign-in Assistant and 2) Windows Azure Active Directory Module for Windows PowerShell are installed. Prerequisite not found: Windows PowerShell module 'MSOnline' is not installed on the machine. [RemoteException] The specified module 'MSOnline' was not loaded because no valid module file was found in any module directory.
Due to missing two prerequisites that needs to be installed on the servers:
Follow Microsoft's article to install the two prerequisites:
Note: PowerShell 5.0 is required before you can run Install-Module. Alternatively, you may directly use the installers attached to install the two prerequisites.
After installing the two prerequisites, run the following PowerShell cmdlets and make sure no error occurs:
Import-Module MSOnline
Get-Module MSOnline
$cred = Get-Credential
Connect-MsolService -Verbose -Credential $cred
Get-MsolUser -SearchString <yourMailbox>
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center