Hi I'm getting this powershell error when trying to connect exchange mailbox sensors
Last Message:
The Sensor can not connect to the Device using Remote-PowerShell. Ensure that remote management is enabled on the Exchange Server and the user-name and password is correct. See https://kb.paessler.com/knowledgebase/en/topic/54353 for details. Processing data from remote server mail01.domain.local failed with the following error message: [ClientAccessServer=MAIL01,BackEndServer=mail01.domain.local,RequestId=26652103-63eb-4fb5-b949-acde2b764c0d,TimeStamp=2/23/2019 3:56:14 PM] [AuthZRequestId=932bf484-f860-47f1-8417-a8e2b6509566][FailureCategory=AuthZ-AuthorizationException] Fail to create a runspace because you have exceeded the maximum number of connections allowed : 18 for the policy party : MaxConcurrency. Please close existing runspace and try again. Policy: CN=GlobalThrottlingPolicy_8fb5dfca-0046-46dd-aa69-bfb9682e5de1,CN=Global Settings,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=snowball,DC=dk; Snapshot: Owner:Sid~S-1-5-21-4246423650-437526043-1281331554-500~WSMan~false BudgetType:WSMan ActiveRunspaces:18/18 Balance:$null/2147483647/0 PowerShellCmdletsLeft:9223372036854775807/Unlimited ExchangeCmdletsLeft:9223372036854775807/Unlimited CmdletTimePeriod:Unlimited DestructiveCmdletsLeft:9223372036854775807/Unlimited DestructiveCmdletTimePeriod:Unlimited QueueDepth:Unlimited MaxRunspacesTimePeriod:Unlimited RunSpacesRemaining:9223372036854775807/Unlimited LastTimeFrameUpdate:23-02-2019 15:05:48 LastTimeFrameUpdateDestructiveCmdlets:23-02-2019 15:05:48 LastTimeFrameUpdateMaxRunspaces:23-02-2019 15:05:48 Locked:False LockRemaining:00:00:00 For more information, see the about_Remote_Troubleshooting Help topic.
Article Comments
Hi,
Yes, actually PRTG does in fact, every now and again, manage to connect. But shortly after successfully connecting the ActiveRunSpaces reaches the max allowed and the sonsors drop off again.
Br. Peter
Feb, 2019 - Permalink
Hi there,
Have you tried to increase the amount of allowed Runspaces?
Best regards.
Feb, 2019 - Permalink
We got the same error code: Fail to create a runspace because you have exceeded the maximum number of connections allowed : 18 for the policy party : MaxConcurrency. Please close existing runspace and try again.
MaxShellsPerUser is set to 2147483647
Is there another setting to check?
Mar, 2019 - Permalink
Hi there,
You can try the following commands on the target system and PRTG system:
cd WSMan:\localhost\Plugin\microsoft.powershell\Quotas set-item MaxConcurrentUsers 100 set-item MaxProcessesPerShell 10000 set-item MaxShells 1000 set-item MaxShellsPerUser 1000 restart-service winrm
Best regards.
Mar, 2019 - Permalink
Thanks for the fast answer. Every option got the value 2147483647.
I think the problem is the ThrottlingPolicy.
PowerShellMaxConcurrency and PswsMaxConcurrency got the value 18.
Could this be the problem? Is it safe to change this values?
Mar, 2019 - Permalink
Hi there,
You can surely change that, all that it does is to limit the amount of concurrent connections (as the options name indicates). If you set it not too high (like 100-200), then you shouldn't run into an issue.
Best regards.
Mar, 2019 - Permalink
Hi there,
Have you checked the suggested points in the error message?
Ensure that remote management is enabled on the Exchange Server and the user-name and password is correct
Best regards.
Feb, 2019 - Permalink