Difference between revisions of "Template:Archiving Exchange Throttling"

[unchecked revision][checked revision]
 
Line 101: Line 101:
 
Set-Mailbox '[email protected]' -ThrottlingPolicy $null
 
Set-Mailbox '[email protected]' -ThrottlingPolicy $null
 
</source>
 
</source>
|2013|2016 =<source lang="powershell" smart-tabs="true" toolbar="false" gutter="false">
+
|2013|2016|2019 =<source lang="powershell" smart-tabs="true" toolbar="false" gutter="false">
 
   Set-ThrottlingPolicyAssociation -Identity '[email protected]' -ThrottlingPolicy $null
 
   Set-ThrottlingPolicyAssociation -Identity '[email protected]' -ThrottlingPolicy $null
 
</source>}}
 
</source>}}

Latest revision as of 09:14, 18 September 2018

Exchange 2013 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. 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 = (Get-ThrottlingPolicyAssociation -Identity $serviceAccount).ThrottlingPolicyId
$policy = switch($policy) {$null {Get-ThrottlingPolicy | Where ThrottlingPolicyScope -eq 'Global'} default {$policy | Get-ThrottlingPolicy}}
$policy | format-list -property Name, ThrottlingPolicyScope, EWS*

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 (e.g. [email protected]) 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                  : GlobalThrottlingPolicy_b4ef32cb-3677-44fd-be1a-ad784931f16f
ThrottlingPolicyScope : Global
EwsMaxConcurrency     : 27
EwsMaxBurst           : 300000
EwsRechargeRate       : 900000
EwsCutoffBalance      : 3000000
EwsMaxSubscriptions   : 5000

In this case, no separate policy exists for the MailStore service account. The value 'Global' of the property ThrottlingPolicyScope indicates that the global throttling policy of the system applies to the MailStore service account [email protected] as well. Had the value been 'Regular', 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 -EWSMaxConcurrency Unlimited -EWSMaxSubscriptions Unlimited -EwsCutoffBalance Unlimited -EwsMaxBurst Unlimited -EwsRechargeRate Unlimited -IsServiceAccount -ThrottlingPolicyScope Regular
  
Set-ThrottlingPolicyAssociation -Identity '[email protected]' -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
ThrottlingPolicyScope : Regular
EwsMaxConcurrency     : Unlimited
EwsMaxBurst           : Unlimited
EwsRechargeRate       : Unlimited
EwsCutoffBalance      : Unlimited
EwsMaxSubscriptions   : Unlimited

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-ThrottlingPolicyAssociation -Identity '[email protected]' -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.