当我退出PowerShell远程会话时,我正在遇到SOAP错误,我将从Windows 10系统远程连接到Ubuntu 16.04服务器。有没有办法解决或消除这个错误?
我收到以下错误:
Closing the remote server shell instance failed with the following error message : <SOAP-ENV:Fault xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"><SOAP-ENV:Code><SOAP-ENV:Value>SOAP-ENV:Receiver</SOAP-ENV:Value><SOAP-ENV:Subcode><SOAP-ENV:Value>wsman:InternalError</SOAP-ENV:Value></SOAP-ENV:Subcode></SOAP-ENV:Code><SOAP-ENV:Reason><SOAP-ENV:Text xml:lang="en-US"/></SOAP-ENV:Reason></SOAP-ENV:Fault> For more information, see the about_Remote_Troubleshooting Help topic.
在Ubuntu服务器上,我目前安装了Open Management Infrastructure版本1.4.2-1,PowerShell远程协议版本1.4.1-28和PowerShell Core 6.0.1。对于此设置,我按照以下网站上的说明进行操作:https://4sysops.com/archives/powershell-remoting-between-windows-and-linux/
这就是我一贯重现错误的方法:
## Setup Credentials to connect to PowerShell on remote Linux server
$credentials = Get-Credential
## Disable cert checking (for now)
$sessionOptions = New-PSSessionOption -SkipCACheck -SkipRevocationCheck -SkipCNCheck
## Start the remote session
Enter-PSSession -ComputerName ServerName -Credential $credentials -Authentication basic -UseSSL -SessionOption $sessionOptions
## Exit out of the remote session
exit
## This is the error I receive on exit:
Closing the remote server shell instance failed with the following error message : <SOAP-ENV:Fault xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"><SOAP-ENV:Code><SOAP-ENV:Value>SOAP-ENV:Receiver</SOAP-ENV:Value><SOAP-ENV:Subcode><SOAP-ENV:Value>wsman:InternalError</SOAP-ENV:Value></SOAP-ENV:Subcode></SOAP-ENV:Code><SOAP-ENV:Reason><SOAP-ENV:Text xml:lang="en-US"/></SOAP-ENV:Reason></SOAP-ENV:Fault> For more information, see the about_Remote_Troubleshooting Help topic.
答案 0 :(得分:1)
对于遇到此问题的其他人,我发现我使用的是错误的表单。而不是键入&#34;退出&#34;我需要使用&#34;退出-PSSession&#34;
答案 1 :(得分:-1)
没有得到解决方案,因为微软在Exit-PSSession页面上说 您也可以使用Exit关键字结束交互式会话。效果与使用Exit-PSSession相同。 无论如何,即使在运行Exit-PSSession的情况下,我在WIN 2016上也遇到了同样的麻烦,PS5.1会通过PS6迁移到SLES x64 12.2。