3

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"}

3 Answers 3

0

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

3
  • Well what if someone does need to work with 50 shell windows at once? Mar 26, 2010 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, 2010 at 17:48
  • Thanks Chris, I did not close the connection properly to the shell , and now it works like charm.
    – Ybbest
    Jul 7, 2010 at 21:56
4

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`"`}
3

You can also use the wsman provider

set-item WSMan:\localhost\Shell\MaxShellsPerUser -value 50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .