Exchange Connection Problems

Fix Exchange Online PowerShell ShellId and Remote Server Errors

Kushani NimanthikaKushani Nimanthika Nov 20, 2026 869 views

Question details

Resolve remote server and ShellId errors when connecting to Exchange Online PowerShell.

Fix Exchange Online PowerShell ShellId and Remote Server Errors
Product
Microsoft Exchange Online PowerShell
Device & OS
not provided
Scenario
An administrator is connecting to Exchange Online in an organization that may use federated authentication, single sign-on, or MFA.
Observed behavior
The connection may fail with a Windows Remote Shell message saying that the ShellId was not found on the server. Some administrator sessions may also disconnect or encounter throttling warnings.
Before you start

Confirm that the account has the required Exchange Online administrative permissions and can complete your organization's sign-in and MFA prompts. Note the exact error and connection time so you can match them to sign-in logs.

Solution 1Recommended

Connect with the current Exchange Online PowerShell module

Use the supported connection method instead of legacy remote PowerShell session commands, especially when MFA or federation is involved.

Legacy commands such as New-ExoPSSession and Import-PSSession rely on older remote PowerShell workflows. The current Exchange Online PowerShell module uses Connect-ExchangeOnline and supports modern authentication.

1
Check the execution policy

In PowerShell, run Get-ExecutionPolicy -List. Check whether a policy prevents module scripts from running; organizational Group Policy settings can override local settings.

2
Correct the policy if permitted

If your organization's policy allows it and the current-user setting needs correction, run Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned. Do not override organizational security requirements.

3
Install or update the module

In PowerShell, run Install-Module ExchangeOnlineManagement -Scope CurrentUser. If it is already installed, use Update-Module ExchangeOnlineManagement, subject to your installation permissions.

4
Connect and authenticate

Run Import-Module ExchangeOnlineManagement, then Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com. Replace the address with your administrator account and complete the sign-in and MFA prompts.

5
Test and disconnect

Run Get-EXOMailbox -ResultSize 1 to test access. When finished, run Disconnect-ExchangeOnline.

Connect with the current Exchange Online PowerShell module
Federated sign-in: If sign-in fails in an AD FS or SSO environment, review the organization's federation and Conditional Access configuration with its identity administrator. A ShellId error alone does not identify the authentication cause.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations in a familiar interface. It supports common Microsoft Office formats for an easier transition, but it does not fix or administer Exchange Online PowerShell connections.

Open and edit Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar interface for everyday office tasksReview spreadsheets exported during Exchange troubleshootingWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Should I still use New-ExoPSSession to connect to Exchange Online?

For current connections, install or update the ExchangeOnlineManagement module and use Connect-ExchangeOnline. New-ExoPSSession and Import-PSSession belong to a legacy remote PowerShell workflow.

How can I check whether the execution policy is blocking scripts?

Run Get-ExecutionPolicy -List in PowerShell to see policies at each scope. A MachinePolicy or UserPolicy set by Group Policy can override local settings.

Can I connect to Exchange Online PowerShell with MFA?

Yes. Run Connect-ExchangeOnline -UserPrincipalName with your administrator address and complete the interactive sign-in and MFA prompts. Your organization's Conditional Access and federation settings also apply.

Does a throttling warning mean my administrator account is locked?

Not necessarily. Throttling can result from too many or frequent requests. Check the account's sign-in status under Identity > Users in the Microsoft Entra admin center and review sign-in logs for authentication failures.