Template:Archiving Exchange Throttling

Revision as of 07:16, 21 September 2015 by Bmeyn (talk | contribs)

Exchange 2010 supports throttling since the RTM version. With throttling you can control on the Exchange side the speed and the amount of emails individual users can download from the Exchange server. Since Exchange 2010 SP1 this feature is enabled by default.

Determining the Throttling Policy Applied to the MailStore Service Account

You can use the following Powershell script to check which throttling policy is applied to the service account that MailStore uses for archiving:

Param([Parameter(Mandatory=$True)][string]$serviceAccount)
$policy = $null
$policyLink = (Get-Mailbox $serviceAccount).ThrottlingPolicy 
if ($policyLink -eq $null)
{ 
  $policy = Get-ThrottlingPolicy | where-object {$_.IsDefault -eq $true}
}
else
{
  $policy = $policyLink | Get-ThrottlingPolicy
}

$result = $policy | format-list -property Name, IsDefault, EWS*
$result

To use the script, please copy the entire content into a text editor and save the script as policycheck.ps1, for example on the desktop of the Exchange server.

You can now run the script from the Exchange Management Shell with the UPN (User Principal Name) of the MailStore service account as parameter. Since, in the context of MailStore Server, only the EWS values are of any interest, the following result may be displayed:

[PS] C:\Users\Administrator\Desktop>.\policycheck.ps1 mailstore@example.com
  
Name                          : DefaultThrottlingPolicy_8c5771...
IsDefault                     : True
EWSMaxConcurrency             : 100
EWSPercentTimeInAD            : 50
EWSPercentTimeInCAS           : 90
EWSPercentTimeInMailboxRPC    : 60
EWSMaxSubscriptions           : 5000
EWSFastSearchTimeoutInSeconds : 60
EWSFindCountLimit             : 1000

In this case, no separate policy exists for the MailStore service account. The value 'True' of the property IsDefault indicates that the default throttling policy of the system applies to the MailStore service account as well. Had the value been 'False', the individual policy Name would already have been applied to the MailStore service account.

Creating and Assigning an Individual Throttling Policy

Because MailStore regularly establishes many connections to the Exchange server and may have to download large amounts of emails through its service account, the account should be exempt from the restrictions of the global throttling policy. You can achieve this by creating a dedicated throttling policy for the MailStore service account:

New-ThrottlingPolicy MailStoreServerPolicy 
Get-ThrottlingPolicy MailStoreServerPolicy | Set-ThrottlingPolicy -EWSFindCountLimit 2500 -EWSPercentTimeInAD 70 -EWSPercentTimeInCAS 120 -EWSPercentTimeInMailboxRPC 80
Set-Mailbox ''mailstore@example.com'' -ThrottlingPolicy MailStoreServerPolicy

In line 1, a new throttling policy with the desired values is created, in line 2, this individual throttling policy is assigned to the MailStore service account. The result can be checked again with the script listed above:

[PS] C:\Users\Administrator\Desktop>.\policycheck.ps1 mailstore@example.com
  
Name          				  : MailStoreServerPolicy
IsDefault                     : False
EWSMaxConcurrency             : 100
EWSPercentTimeInAD            : 70
EWSPercentTimeInCAS           : 120
EWSPercentTimeInMailboxRPC    : 80
EWSMaxSubscriptions           : 5000
EWSFastSearchTimeoutInSeconds : 60
EWSFindCountLimit             : 2500

Important: Please note that a mailbox must be set up for the MailStore service account in order to be able to assign a dedicated throttling policy to it.

Removing and Deleting an Individual Throttling Policy

To delete an individual throttling policy from a mailbox or user account, execute the following command in the Exchange Management Shell:

Set-Mailbox ''mailstore@example.com'' -ThrottlingPolicy $null

This removes the assignment of a throttling policy. To delete the throttling policy from the Exchange system, execute the following command in the Exchange Management Shell:

Remove-ThrottlingPolicy MailStoreServerPolicy

Confirm this by entering "Y". The policy is now deleted from the system.