I want to apply the following PowerShell settings on many servers:
Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 12345
Set-Item WSMan:\localhost\Plugin\Microsoft.PowerShell\Quotas\MaxMemoryPerShellMB 12345
I found https://technet.microsoft.com/en-us/library/hh751276(v=sc.12).aspx and tested that the Computer Configuration\Administrative Templates\Windows Components\Windows Remote Shell\Specify maximum amount of memory in MB per Shell
setting changes localhost\Shell\MaxMemoryPerShellMB
, but is there a way to change localhost\Plugin\Microsoft.PowerShell\Quotas\MaxMemoryPerShellMB
?
You should be able to set the value on a test system using the PS commands you listed and then go into the registry to:
There find the key
ConfigXML
and copy the Value. Use this value in a GPO that sets Computer Configuration, Preferences, Registry.