0

我正在尝试运行调用该Start-Process函数的 Powershell 脚本,以便开始安装一些监控软件。我正在尝试通过使用Enter-PSSession. 我已经在下面的行中验证了参数列表和文件路径是正确的。

Start-Process -FilePath $Installer -ArgumentList $ArgList -Wait -PassThru

然而,当脚本到达这一行时,它会关闭我与我所在的服务器的远程会话,并引发以下错误之一:

Processing data for a remote command failed with the following error message: The WSMan provider host process did not return a proper response.  A provider in the host 
process may have behaved improperly. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : ResourceUnavailable: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException

或者

Starting a command on the remote server failed with the following error message : An operation is being attempted on a session that is being closed.This can happen if the 
session that is being used is also being closed by another thread. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : ResourceUnavailable: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException 

我尝试将每个 shell 的最大内存分配加倍到 2Gb,但这并没有帮助。以前有人遇到过这样的问题吗?

4

0 回答 0