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

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,509 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,492 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,511 questions
{count} votes

Accepted answer
  1. Vasil Michev 104K Reputation points MVP
    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.