How can I get 7za.exe to run via Powershell Remoting?

我们两清 提交于 2019-11-30 03:52:23

Remote shells are limited to 150 MB of memory by default. You can tweak this with the winrm command-line utility on the server; I'm not sure if the powershell wsman:\ drive will let you change this interactively because I think it's a general property of the shell plugin functionality in winrm and not directly connected to powershell.

C:\Windows\system32>winrm get winrm/config/winrs
Winrs
    AllowRemoteShellAccess = true
    IdleTimeout = 180000
    MaxConcurrentUsers = 5
    MaxShellRunTime = 2147483647
    MaxProcessesPerShell = 15
    **MaxMemoryPerShellMB = 150**
    MaxShellsPerUser = 5

Compressing large files is a memory-hungry process.

Another solution is to change the configuraiton of the Windows Remote Shell.

You could execute the following in a PowerShell prompt on the remote server:

Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 2048

This is especially useful if you don't want to apply the change via Group Policy.

Ps: To see what the currently configured value is try executing the following:

Get-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!