I'd like to increase number of concurrent shells in PowerShell V2.I tried using the following command ,but I got no luck.The error I got is" Error: Invalid use of command line. Type "winrm -?" for help." Can someone shine some light?

winrm set winrm/config/winrs @{MaxShellsPerUser="50"}
link|improve this question

71% accept rate
feedback

3 Answers

up vote 0 down vote accepted

In most cases concerning the upper limits of programming structures and the like:
"If you have to ask, you're probably doing it wrong" - TheDailyWTF.com

link|improve this answer
Well what if someone does need to work with 50 shell windows at once? – grawity Mar 26 '10 at 13:16
I realize it's a smart-mass answer, but I stick by the assertion that if you think you need more than 50 shells at one, there's probably a better way with less shells. – Chris S Mar 26 '10 at 17:48
Thanks Chris, I did not close the connection properly to the shell , and now it works like charm. – Ybbest Jul 7 '10 at 21:56
feedback

That syntax likely will work fine from DOS, but from PowerShell, you'll have to escape some of the characters. This seems to have worked for me:

PS> winrm set winrm/config/winrs `@`{MaxShellsPerUser=`"50`"`}
link|improve this answer
feedback

You can also use the wsman provider

set-item WSMan:\localhost\Shell\MaxShellsPerUser -value 50
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.