まずは、現在のPowershellの同時実行数を調べる
Get-Item WSMan:\localhost\Shell\MaxShellsPerUser
Get-Itemコマンドレットを使い、Powershellの実行数を調べる。
WinRMを使用するので、管理者モードで実行する。
もし、WinRMサービスが起動していない場合には、起動するかを問われるのでYesを答える。
PS C:\Windows\system32> Get-Item WSMan:\localhost\Shell\MaxShellsPerUser WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Shell Name Value Type ---- ----- ---- MaxShellsPerUser 5 System.String PS C:\Windows\system32>
つぎにPowershellの同時実行数を無制限にする
Set-Item WSMan:\localhost\Shell\MaxShellsPerUser 0
Set-Itemコマンドレットを使用し、MaxShellsPerUserを0で指定する。
0の場合は、無制限になる。
10や20を指定すれば、同時実行数はその数になる。