Exchange OnlineDeep dive

Exchange Online PowerShell V3 errors: Connect-ExchangeOnline, module install and cmdlets

What the common Exchange Online PowerShell V3 errors mean (module install, execution policy, Connect-ExchangeOnline, legacy remote PowerShell and cmdlet failures) and what to check first.

Most Exchange Online PowerShell problems happen in one of three places: installing or loading the ExchangeOnlineManagement module, signing in with Connect-ExchangeOnline, or running a cmdlet once you're connected. This quick reference lists the documented messages from each stage, plus the legacy remote PowerShell errors that old scripts still produce, with the meaning, the usual cause and the first thing to check.

Codes in this quick reference

  • Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.Connect-ExchangeOnline
  • Cannot find a cmdlet Update-Manifest: PowerShellGet isn't installedConnect-ExchangeOnline
  • The specified module 'ExchangeOnlineManagement' with PowerShellGetFormatVersion '<version>' isn't supported (old PowerShellGet)Install-Module / Update-Module
  • WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''.Install-Module / Update-Module
  • WARNING: Unable to download the list of available providers. Check your internet connection.Install-Module / Update-Module
  • No match was found for the specified search criteria and module name 'ExchangeOnlineManagement'.Install-Module
  • The term 'Update-ModuleManifest' is not recognized as a name of a cmdlet, function, script file, or executable program.Connect-ExchangeOnline (PowerShell SDK)
  • The term 'Connect-ExchangeOnline' is not recognized as the name of a cmdlet, function, script file, or operable program.PowerShell console

+ 7 more codes in the tables below.

How this guide is organized: How to read these errors → Installing and loading the module → Connecting and signing in → App-only (certificate) connections → Running cmdlets → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these errors. 2. Installing and loading the module. 3. Connecting and signing in. 4. App-only (certificate) connections. 5. Running cmdlets. 6. How to verify a fix. Toolbox: Connect-ExchangeOnline, Get-ConnectionInformation, New-PSSession, UseRpsSession, .onmicrosoft.com.1How to read these errors2Installing and loading themodule3Connecting and signing in4App-only (certificate)connections5Running cmdlets6How to verify a fixTOOLBOXConnect-ExchangeOnlineGet-ConnectionInformationNew-PSSessionUseRpsSession.onmicrosoft.comHow this guide is organized: How to read these errors → Installing and loading the module → Connecting and signing in → App-only (certificate) connections → Running cmdlets → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these errors. 2. Installing and loading the module. 3. Connecting and signing in. 4. App-only (certificate) connections. 5. Running cmdlets. 6. How to verify a fix. Toolbox: Connect-ExchangeOnline, Get-ConnectionInformation, New-PSSession, UseRpsSession, .onmicrosoft.com.1How to read these errors2Installing and loading the module3Connecting and signing in4App-only (certificate) connections5Running cmdlets6How to verify a fixTOOLBOXConnect-ExchangeOnlineGet-ConnectionInformationNew-PSSessionUseRpsSession.onmicrosoft.com
At a glance: how this guide is organized · 6 sections · 5 key settings and tools

How to read these errors#

Which stage an Exchange Online PowerShell error comes fromAt which stage does it fail? if Install or load: Fix the module install before connecting (Execution policy, PowerShellGet or a version mismatch); if Sign-in: What does the sign-in failure show? if AADSTS code: A Microsoft Entra sign-in error (See the MFA errors, Conditional Access blocks or app sign-in errors); if Remote PowerShell: Replace session code with a current module (Only REST API connections work since October 2023); if No error text: Check PowerShell access and WAM (EXOModuleEnabled for one admin; -DisableWAM if the window hangs); if Running a cmdlet: Read the exception type (Every cmdlet uses REST API connections since 3.0.0)At which stage does it fail?FIXFix the moduleinstall beforeconnectingExecution policy,PowerShellGet or aversion mismatchInstall or loadWhat does the sign-in failureshow?NOTEA Microsoft Entrasign-in errorSee the MFA errors,Conditional Accessblocks or app sign-inerrorsAADSTS codeFIXReplace sessioncode with acurrent moduleOnly REST APIconnections worksince October 2023Remote PowerShellFIXCheckPowerShellaccess and WAMEXOModuleEnabledfor one admin;-DisableWAM if thewindow hangsNo error textSign-inFIXRead theexception typeEvery cmdlet usesREST APIconnections since3.0.0Running a cmdletWhich stage an Exchange Online PowerShell error comes fromAt which stage does it fail? if Install or load: Fix the module install before connecting (Execution policy, PowerShellGet or a version mismatch); if Sign-in: What does the sign-in failure show? if AADSTS code: A Microsoft Entra sign-in error (See the MFA errors, Conditional Access blocks or app sign-in errors); if Remote PowerShell: Replace session code with a current module (Only REST API connections work since October 2023); if No error text: Check PowerShell access and WAM (EXOModuleEnabled for one admin; -DisableWAM if the window hangs); if Running a cmdlet: Read the exception type (Every cmdlet uses REST API connections since 3.0.0)At which stage does it fail?Install or loadFIXFix the module install before connectingExecution policy, PowerShellGet or a versionmismatchSign-inWhat does the sign-in failure show?AADSTS codeNOTEA Microsoft Entra sign-in errorSee the MFA errors, Conditional Access blocks orapp sign-in errorsRemote PowerShellFIXReplace session code with a currentmoduleOnly REST API connections work since October2023No error textFIXCheck PowerShell access and WAMEXOModuleEnabled for one admin; -DisableWAMif the window hangsRunning a cmdletFIXRead the exception typeEvery cmdlet uses REST API connections since 3.0.0
Figure 1 · Decision tree Which stage an Exchange Online PowerShell error comes from. Start with the stage that failed. Whatever the stage, check the module version and the connection first with the commands in this section.
  • Install and load: messages from Install-Module, Update-Module or PowerShell itself, before any connection exists.
  • Sign-in: a sign-in window error is a Microsoft Entra code (AADSTS). Those are covered in the MFA errors, Conditional Access blocks and, for app-only connections, app sign-in errors articles.
  • Cmdlets: since version 3.0.0, every cmdlet uses REST API connections. Errors include the exception type, and the global variable $EXO_LastExecutionStatus (3.3.0 and later) shows whether the last cmdlet succeeded.

Start every investigation with the module version, the connection and, if needed, a log:

PowerShell
Get-InstalledModule ExchangeOnlineManagement | Format-List Name, Version, InstalledLocation
Get-InstalledModule PackageManagement -AllVersions; Get-InstalledModule PowerShellGet -AllVersions
Get-ConnectionInformation | Format-List
Connect-ExchangeOnline -UserPrincipalName admin@contoso.com -EnableErrorReporting -LogDirectoryPath C:\Temp\EXOLogs -LogLevel All

Version rules that explain many "it worked yesterday" failures: module 3.10.0 and later need PowerShell 7.6 or later, versions 3.5.0 to 3.9.2 need 7.4 or later, and Windows PowerShell 5.1 runs every version (with .NET Framework 4.7.2). Preview versions of PackageManagement or PowerShellGet can also break connections.

Installing and loading the module#

CodeMeaningUsual causeFirst check
Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.PowerShell refuses to run the module's scriptsThe execution policy still blocks scripts, which is the defaultSet-ExecutionPolicy RemoteSigned in an elevated session
Cannot find a cmdlet Update-ManifestConnecting needs PowerShellGetPowerShellGet isn't installed (Windows)Install or update PowerShellGet, then close and reopen PowerShell
The specified module 'ExchangeOnlineManagement' with PowerShellGetFormatVersion '<version>' isn't supported by the current version of PowerShellGet.PowerShellGet is too old for this moduleUsually the old version that ships with Windows PowerShell 5.1Update PowerShellGet, reopen the window, then retry
WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''.PowerShellGet can't download its provider listAn old PowerShellGet; on older Windows, Windows PowerShell 5.1 not using TLS 1.2, which the PowerShell Gallery requiresUpdate PowerShellGet; apply Microsoft's PowerShell Gallery TLS guidance
WARNING: Unable to download the list of available providers. Check your internet connection.Logged with the line aboveSame causesSame fix
No match was found for the specified search criteria and module name 'ExchangeOnlineManagement'.The module can't be found in any registered repositoryThe PowerShell Gallery (PSGallery) isn't registered as the default repositoryGet-PSRepository, then Register-PSRepository -Default
The term 'Update-ModuleManifest' is not recognized as a name of a cmdlet, function, script file, or executable program.Seen when connecting from code through the Windows PowerShell SDKLoading format data in that hostAdd -SkipLoadingFormatData to Connect-ExchangeOnline
The term 'Connect-ExchangeOnline' is not recognized as the name of a cmdlet, function, script file, or operable program.PowerShell can't find the moduleNot installed, or installed for another account or for the current user in the other PowerShell editionGet-InstalledModule ExchangeOnlineManagement in this window; install with -Scope CurrentUser

Connecting and signing in#

Since October 2023, Exchange Online PowerShell accepts only REST API connections. Scripts that still build a remote PowerShell session with New-PSSession, or run very old module versions, fail with the errors below. The fix is the same for all of them: a current module and Connect-ExchangeOnline instead of session code (see Exchange Online PowerShell V3: connect and automate). The UseRpsSession parameter was deprecated in version 3.9.2.

CodeMeaningUsual causeFirst check
[outlook.office365.com] Connecting to remote server failed with the following error message: Access is denied.The remote PowerShell sign-in was refusedWrong credentials, an account without Exchange Online access, or security defaults blocking the old sign-inUse Connect-ExchangeOnline with modern authentication
Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null.Follows the row above: no session was createdThe failed New-PSSessionFix the connection, not this line
The WinRM client cannot process the requestWinRM on the client won't use Basic authenticationThe old remote PowerShell method needed Basic authentication in WinRMREST connections don't need it: switch to the module
Cannot invoke the pipeline because the runspace isn't in the Opened state. Current state of the runspace is 'Closed'.A piped command ran against a closed sessionAn authentication bug in early module versionsUpdate-Module ExchangeOnlineManagement; current versions don't open a runspace

Three sign-in problems have no single error text:

  • Only one admin can't connect. Check whether PowerShell access was turned off for that account: Get-User -Identity admin@contoso.com | Format-List EXOModuleEnabled, and have another admin run Set-User -Identity admin@contoso.com -EXOModuleEnabled $true.
  • The sign-in window fails or hangs. Version 3.7.0 added Web Account Manager (WAM) to the sign-in flow. For WAM-related errors, add -DisableWAM (3.7.2 and later); on a machine without a browser, use -Device in PowerShell 7.
  • Linux or macOS. Connect-IPPSSession isn't available in PowerShell 7 on either, and on Ubuntu 20.04 module versions 3.7.0 to 3.9.2 might fail with SSL protocol errors. For Security & Compliance PowerShell, see Connect-IPPSSession errors.

App-only (certificate) connections#

Unattended scripts fail for setup reasons more than for code reasons. Before you debug the script, confirm each item Microsoft lists:

  • The app has the Office 365 Exchange Online › Exchange.ManageAsApp application permission, with admin consent granted.
  • The app holds a supported Microsoft Entra role (for example Exchange Administrator, Exchange Recipient Administrator or Global Reader), or its service principal is in a custom role group (New-ServicePrincipal, then Add-RoleGroupMember). Without one, the session has no permissions.
  • The certificate uses a CSP key, not a Cryptography Next Generation (CNG) key, which is the default in modern Windows. Create it with New-SelfSignedCertificate ... -KeySpec KeyExchange.
  • -CertificateThumbprint works only on Windows, with the certificate in the user certificate store.
  • -Organization is the primary .onmicrosoft.com domain.
  • The script doesn't call New-UnifiedGroup, Remove-UnifiedGroup, Add-UnifiedGroupLinks or Remove-UnifiedGroupLinks, which don't support app-only authentication; use Microsoft Graph instead.

Running cmdlets#

CodeMeaningUsual causeFirst check
The operation couldn't be performed because object '<identity>' couldn't be found on '<server>'. (ManagementObjectNotFoundException)The identity didn't resolve to an object of the type the cmdlet expectsA typo, the wrong cmdlet for the recipient type (for example Get-Mailbox for a mail user), or an object that hasn't synced yetGet-Recipient '<identity>' | Format-List Name, RecipientTypeDetails
The term 'Get-Mailbox' is not recognized as the name of a cmdlet (after connecting)That cmdlet isn't loaded in your sessionThe connection dropped, -CommandName limited what was imported, or none of your roles include the cmdletGet-ConnectionInformation; Get-ManagementRole -Cmdlet Get-Mailbox to see which roles grant it
The data in the command exceeded the maximum permitted by the session configuration. The allowed maximum is 500MB.Too much data for one remote PowerShell commandGet-Mailbox -ResultSize Unlimited in a very large organization over the old sessionUse Get-EXOMailbox with -PropertySets or -Properties to return only what you need

Limits and throttling in REST connections#

  • REST cmdlets retry transient failures themselves, but each cmdlet times out after 15 minutes. Microsoft's example is Update-DistributionGroupMember with 10,000 members: update about half, then add the rest one by one with Add-DistributionGroupMember.
  • Invoke-Command doesn't work against REST connections, and Get-PSSession shows nothing: use Get-ConnectionInformation.
  • Calling Connect-ExchangeOnline and Disconnect-ExchangeOnline repeatedly in one session can leak memory. Connect once and use -CommandName to import only the cmdlets the script needs.
  • For loops over thousands of objects, use the Get-EXO* cmdlets for reads, and add a short Start-Sleep between per-object calls, as Microsoft's workaround for large queries does.
  • Get-Help shows little since 3.7.0, because help isn't loaded by default: add -LoadCmdletHelp when you connect.

How to verify a fix#

PowerShell
Connect-ExchangeOnline -UserPrincipalName admin@contoso.com -ShowBanner:$false
Get-ConnectionInformation | Format-List
Get-EXOMailbox -ResultSize 1 | Format-List DisplayName, PrimarySmtpAddress
$EXO_LastExecutionStatus
Disconnect-ExchangeOnline -Confirm:$false
  • The connection appears in Get-ConnectionInformation with the expected account or app ID and organization.
  • A read returns data and the failing cmdlet now runs; for app-only scripts, run the scheduled task once by hand and check its output.
  • After module updates, Get-InstalledModule shows one current version in the scope you use.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

Intune Subject Matter Expert in Cairo, Egypt, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)