question

MichaelChien-2712 avatar image
0 Votes"
MichaelChien-2712 asked KyleXu-MSFT commented

sync-mailpublicfolder.ps1 error on Exchange 2010 hybrid

So I have Exchange 2010 running EXO hybrid, and have mail enabled public folders synced. I have been running the sync-mailpublicfolder.ps1 scripts 2 to 3 times a week fine for at least a year now. Then all of a sudden since last week, I am getting error messages every time I run the scripts. The error is

InitializeExchangeOnlineRemoteSession : Unable to create a remote shell session to Exchange Online. The error is as follows: "Connecting to remote server 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.". At C:\pfscripts\Sync-MailPublicFolders.ps1:506 char:42
+ InitializeExchangeOnlineRemoteSession <<<< ;
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId :
Microsoft.PowerShell.Commands.WriteErrorException,InitializeExchangeOnlineRemoteSession


Any idea how to fix this?

TIA

Michael

office-exchange-hybrid-itpro
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MichaelChien-2712
I am writing here to confirm with you any update about this thread now?
If the suggestion below helps, please be free to accept it as an answer for helping more people.

0 Votes 0 ·

1 Answer

KyleXu-MSFT avatar image
0 Votes"
KyleXu-MSFT answered

@MichaelChien-2712

I would suggest you try to connect to Exchange online with PowerShell, check whether there exist issue it: Basic auth - Connect to Exchange Online PowerShell (Check with prerequisites before connecting)

If you could connect to Exchange online successfully. I would suggest try again with that script.

If you cannot connect to Exchange online, I would suggest you try to disable firewall temporarily, based on my searching, this issue may related with firewall block the connect request.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.