GSX Blog

How to Conduct Throttling in Exchange PowerShell

Posted by cyril leroy on Fri, Jun 21, 2013
powershell throttling gsxsolutions resized 600

Recently, an issue occurred when I was trying to access my Exchange mailbox characteristics. I found out that the problem was caused by the Windows settings and policies that were in place, thus limiting remote access to the server. By altering these limits, I was able to gain full access to the Exchange mailbox and generate GSX Monitor SpotCheck reports on the environment.

Here are the quick steps I took to fix the problem.

I needed to edit the default throttling policy settings limits associated to the user account to collect the statistics:

powershellthrottling1 resized 600

With the intense use of PowerShell in large environments, the default limits set by the system can be reached fairly easily, leading to this type of message: 

Exchange PowerShell error message - "The WS-Management service cannot process the request. This user is allowed a maximum number of X concurrent shells, which has been exceeded. Close existing shells or raise the quota for this user."

First, consider the Windows Remote Management limits:

On your remote server, check the WinRM service limits: (default MaxConnections setting is 25)

powershellthrottling2

Change the settings: (from 25 to 30)

powershellthrottling3

If you are targeting Exchange servers, you should also consider the applicable throttling policies.

You can also limit your remote management capabilities...

Find the throttling policy associated to your user:

powershellthrottling4

Check the limits for this policy:

powershellthrottling5

Now, at this point, I recommend creating a new policy dedicated to validating the impact on your environment:

powershellthrottling6

Change the settings:

powershellthrottling7

Associate this policy to your user account:

powershellthrottling8

And you're finished! Be sure to validate that your scripts are running fine without overloading your servers.

Let me know if you try this out! I'd like to hear if anyone had a different experience.  

 

Tags: Microsoft Exchange, Windows 8, Microsoft, application performance monitoring, Powershell, APM