Fix Exchange Online PowerShell ShellId and Remote Server Errors
Question details
Resolve remote server and ShellId errors when connecting to Exchange Online PowerShell.

- 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.
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.
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.
In PowerShell, run Get-ExecutionPolicy -List. Check whether a policy prevents module scripts from running; organizational Group Policy settings can override local settings.
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.
In PowerShell, run Install-Module ExchangeOnlineManagement -Scope CurrentUser. If it is already installed, use Update-Module ExchangeOnlineManagement, subject to your installation permissions.
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.
Run Get-EXOMailbox -ResultSize 1 to test access. When finished, run Disconnect-ExchangeOnline.

Investigate repeated disconnections and throttling
Use this approach if the current module still disconnects or reports throttling while collecting Exchange data.
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.

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.




