减少每个shell的PowerShell内存使用量

时间:2015-03-09 10:55:31

标签: shell powershell windows-server-2008 sql-server-agent

我在Windows Powershell 4中遇到了一些问题。我需要执行数百个非常小的(Azure)PowerShell脚本。问题是当我查看任务管理器时,每个shell使用50-70 MB。

所以我尝试使用WSman并减少MaxMemoryPerShellMB,对于所有插件以及他们在这篇文章中所说的全部内容:

  

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

之后,我重新启动了Winrm服务并执行了PowerShell,它仍然消耗50MB。对于我的SQL Server Agent执行的Powershell脚本,情况也是如此。

我错过了什么吗?我正在考虑用Nodejs和Azure CLI重写我的脚本,但我想知道为什么MaxMemoryPerShellMB无效。

顺便说一下,我在Windows Server 2008 R2上。

0 个答案:

没有答案