Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
460 views
in Technique[技术] by (71.8m points)

exchange server - Cannot connect to on-premise Exchage Powershell remotelly from Linux

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

Can anyone help?

question from:https://stackoverflow.com/questions/65845438/cannot-connect-to-on-premise-exchage-powershell-remotelly-from-linux

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...