Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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"}
share|improve this question
add comment

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

share|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
add comment

You can also use the wsman provider

set-item WSMan:\localhost\Shell\MaxShellsPerUser -value 50
share|improve this answer
add comment

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`"`}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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