OutOfMemory Exception on remote execution using Powershell Invoke-Command

后端 未结 3 1621
無奈伤痛
無奈伤痛 2021-01-11 17:18

I am trying to execute an exe on a remote computer using invoke-command. Executing the exe on the remote machine after logging into the machine using remote desktop takes 1G

3条回答
  •  Happy的楠姐
    2021-01-11 17:59

    As an addition to mjolinor's answer, you can change the MaxMemoryPerShellMB by running:

    sl WSMan:\localhost\Shell
    Set-Item MaxMemoryPerShellMB 300
    

    Ref: http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/30/learn-how-to-configure-powershell-memory.aspx

提交回复
热议问题