Powershell &引用;WSMan提供程序主机进程未返回正确的响应。”;将已发布的包从SFTP服务器下载到目标服务器时出现问题

Powershell &引用;WSMan提供程序主机进程未返回正确的响应。”;将已发布的包从SFTP服务器下载到目标服务器时出现问题,powershell,sftp,winrm,Powershell,Sftp,Winrm,我已经使用TFS2105实现了CI/CD。我已经将构建工件发布到sftp服务器。在发布管道中,我从sftp服务器下载构建包。此时,它说: [error]The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Processing data from remote server "server_name" faile

我已经使用TFS2105实现了CI/CD。我已经将构建工件发布到sftp服务器。在发布管道中,我从sftp服务器下载构建包。此时,它说:

[error]The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop:
Processing data from remote server "server_name" 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.
在Ps代码中,我下载了下面的代码包

Get-SFTPFile ($sftpSession).SessionId -RemoteFile $_.FullName -LocalPath $targetDir -Overwrite
Start-Sleep -s 5
# disconnect SSH session
由于我的压缩包大小为130MB,所以在发布过程中,我将压缩包分成了几个小文件

我看到大多数人都说要增加“MaxMemoryPerShellMB”值。我已将sftp服务器以及本地服务器目标服务器上的值增加到512MB。即使在我的本地版本中也是4096MB。 我运行了
WinRM quickconfig
WinRM enumerate
,这里是目标机器上的值

我一直在研究这些问题。请帮忙。提前谢谢