Exchange online powershell gets failed sometimes

vishwa a 21 Reputation points
2022-02-22T05:02:33.36+00:00

Hi,

 Sometimes in middle of execution pf a script the exchange online cmdlet gets disconnected stating 

ERROR: Processing data from remote server outlook.office365.com failed with the following error message: The SSL connection cannot be established. Verify that the service on the remote host is properly configured to listen for HTTPS requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig -transport:https". For more information, see the about_Remote_Troubleshooting Help topic.

The instruction asks to check on the remote server, On office365 case, I have no idea how to troubleshoot it

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
Windows for business Windows Client for IT Pros User experience Remote desktop services and terminal services
Windows for business Windows Server User experience PowerShell
{count} votes

Accepted answer
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2022-02-22T06:59:05.833+00:00

    Exchange Online Remote PowerShell is not exactly what you'd call reliable, especially when it comes to long-running scripts. The best advise I can give you is to go over this article and the recommendations therein: https://techcommunity.microsoft.com/t5/exchange-team-blog/running-powershell-cmdlets-for-large-numbers-of-users-in-office/ba-p/604280
    Switching to the "V2" module and the REST-based cmdlets where possible will also help: https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.