0

I'm trying connect to my on-premise Exchange 2013 Powershell remotely from Centos 7.

I do every steps as in microsoft docs (https://docs.microsoft.com/en-us/powershell/exchange/connect-to-exchange-servers-using-remote-powershell) except chaging authentication to 'Basic'.

When I run New-PSSession command prompt (pwsh) freeze for 5-10 minutes. After that Get-PSSession return my session with state 'Opened' but Import-PSSession exit with fail.

The same steps on Windows (with also PowerShell 7.1.1) succes and New-PSSession command finish after second or less.

IIS logs for Exchange shows 500 error for this connection. Please see below:

2021-01-22 10:20:28 192.168.1.3 POST /PowerShell PSVersion=7.1.1&CorrelationID=<empty>;&ClientId=SR*--omitted--*PG&cafeReqId=7e*--omitted--*cb; 443 remotemg@contoso.com 172.16.2.9 - - 200 0 0 171
2021-01-22 10:20:28 192.168.1.3 POST /PowerShell PSVersion=7.1.1&CorrelationID=<empty>;&ClientId=DH*--omitted--*EA&cafeReqId=85*--omitted--*1a; 443 remotemg@contoso.com 172.16.2.9 - - 200 0 0 703
2021-01-22 10:20:30 192.168.1.3 POST /PowerShell PSVersion=7.1.1&CorrelationID=<empty>;&ClientId=JP*--omitted--*TW&cafeReqId=23*--omitted--*c5; 443 remotemg@contoso.com 172.16.2.9 - - 200 0 0 921
2021-01-22 10:20:30 192.168.1.3 POST /PowerShell PSVersion=7.1.1&CorrelationID=<empty>;&ClientId=NR*--omitted--*WW&cafeReqId=a4*--omitted--*9a; 443 remotemg@contoso.com 172.16.2.9 - - 200 0 0 31
2021-01-22 10:22:29 192.168.1.3 POST /PowerShell PSVersion=7.1.1 443 - 172.16.2.9 - - 500 0 64 119312
2021-01-22 10:23:30 192.168.1.3 POST /PowerShell PSVersion=7.1.1&CorrelationID=<empty>;&ClientId=WS*--omitted--*VG&cafeReqId=e8*--omitted--*aa; 443 remotemg@contoso.com 172.16.2.9 - - 500 0 0 180047
2021-01-22 10:25:30 192.168.1.3 POST /PowerShell PSVersion=7.1.1 443 - 172.16.2.9 - - 500 0 64 119500
2021-01-22 10:26:30 192.168.1.3 POST /PowerShell PSVersion=7.1.1&CorrelationID=<empty>;&ClientId=CP*--omitted--*NG&cafeReqId=1d*--omitted--*e2; 443 remotemg@contoso.com 172.16.2.9 - - 500 0 0 180062
2021-01-22 10:29:30 192.168.1.3 POST /PowerShell PSVersion=7.1.1&CorrelationID=<empty>;&ClientId=XA*--omitted--*UQ&cafeReqId=be*--omitted--*ec; 443 remotemg@contoso.com 172.16.2.9 - - 500 0 0 180047

Exchage version: 2013 CU23 (build: 15.0.1497.2)

Can anyone help?

gorek
  • 1

1 Answers1

0

Based on the above microsoft docs, the supportability of the remote PowerShell session on the Linux is not mentioned, remote connecting to Exchange Server PowerShell only works on the following clients and servers:

enter image description here

However, I found a thread which mentions the ways to remote connect to Exchange Server on Linux, please check if it's helpful to you: Connecting to Exchange PowerShell from a Linux machine

Edit: More details about HTTP Status code in IIS: The HTTP status code in IIS 7.0 and later versions

Ivan_Wang
  • 1,333
  • 1
  • 4
  • 4