我想增加PowerShell V2中的并发shell数量。我尝试使用以下命令,但我没有运气。我得到的错误是“错误:命令行无效使用。输入”winrm - ?“求助。” 有人会发光吗?
winrm set winrm/config/winrs @{MaxShellsPerUser="50"}
答案 0 :(得分:5)
从提升的PowerShell提示符执行:
Set-Item WSMan:\localhost\Shell\MaxShellsPerUser 50
答案 1 :(得分:4)
我只想补充Keith的答案,你可以在Administrator’s Guide to Windows PowerShell Remoting中找到所提到的命令以及更多内容。值得一读!
答案 2 :(得分:0)
我无法在我的盒子上激活winrm,但根据MSDN,语法为:
winrm set winrm / config @ {MaxShellsPerUser =“50”}
答案 3 :(得分:0)
你错过了单引号。
winrm set winrm/config/winrs '@{MaxShellsPerUser="50"}'