概要:
我正在运行一个隐式远程服务器来集中200个用户可访问的脚本。 我正在利用远程服务器上的PowerShell 5并利用JEA。 模块和脚本在C:\ Program Files目录中设置。
问题:
我想增加最大并发用户数,因为我只有5个用户连接时遇到问题。 我检查了netstat,看看哪些用户在5985端口上,我一次只能看到最多5个用户。
解决scheme尝试:
1. https://social.technet.microsoft.com/Forums/en-US/08874032-5b83-4cbc-81a3-fa16c44a993f/the-maximum-number-of-concurrent-shells-allowed-for-this-plugin-过气,超出?论坛= winserverpowershell
2. https://blogs.msdn.microsoft.com/powershell/2010/05/02/configuring-wsman-limits/
附注:
我正在利用microsoft.powershell psconfigfile来允许用户连接到远程服务器。
这里是我的WSMAN设置远程处理:
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Shell Type Name SourceOfValue Value ---- ---- ------------- ----- System.String AllowRemoteShellAccess true System.String IdleTimeout 7200000 System.String MaxConcurrentUsers 100 System.String MaxShellRunTime 2147483647 System.String MaxProcessesPerShell 100 System.String MaxMemoryPerShellMB 1024 System.String MaxShellsPerUser 100
错误抛出:
“连接到远程服务器xxxx失败,并显示以下错误消息:WS-Management服务无法处理该请求,超出了该插件允许的最大并发shell数量,稍后重试该请求或者提高Maximum Perls Per Plugin配额。 “
详细的PowerShellconfiguration详细信息:
Architecture : 64 Filename : %windir%\system32\pwrshplugin.dll ResourceUri : http://schemas.microsoft.com/powershell/microsoft.powershell MaxConcurrentCommandsPerShell : 1000 Capability : {Shell} xmlns : http://schemas.microsoft.com/wbem/wsman/1/config/PluginConfiguration MaxConcurrentUsers : 100 Name : microsoft.powershell SupportsOptions : true ProcessIdleTimeoutSec : 0 ExactMatch : False RunAsUser : RunAsVirtualAccountGroups : IdleTimeoutms : 7200000 RunAsVirtualAccount : false OutputBufferingMode : Block PSVersion : 5.0 SecurityDescriptorSddl : Removed* MaxShellsPerUser : 100 AutoRestart : false MaxShells : 100 MaxIdleTimeoutms : 2147483647 Uri : http://schemas.microsoft.com/powershell/microsoft.powershell SDKVersion : 2 XmlRenderingType : text RunAsPassword : MaxProcessesPerShell : 100 ParentResourceUri : http://schemas.microsoft.com/powershell/microsoft.powershell Enabled : true UseSharedProcess : false MaxMemoryPerShellMB : 1024 lang : en-US
经过一番挖掘,我意识到这些修复工作…我只需要重新启动WINRM ….感谢大家的支持。
Restart-Service winrm