Difference between revisions of "Template:Archiving Exchange Throttling"

[checked revision][unchecked revision]
Line 19: Line 19:
 
$result = $policy | format-list -property Name, IsDefault, EWS*
 
$result = $policy | format-list -property Name, IsDefault, EWS*
 
$result
 
$result
</source>|2013|2016 =<source lang="powershell" smart-tabs="true" toolbar="false" gutter="false">
+
</source>|2013|2016|2019 =<source lang="powershell" smart-tabs="true" toolbar="false" gutter="false">
 
Param([Parameter(Mandatory=$True)][string]$serviceAccount)
 
Param([Parameter(Mandatory=$True)][string]$serviceAccount)
 
$policy = (Get-ThrottlingPolicyAssociation -Identity $serviceAccount).ThrottlingPolicyId
 
$policy = (Get-ThrottlingPolicyAssociation -Identity $serviceAccount).ThrottlingPolicyId
Line 42: Line 42:
 
</source>
 
</source>
 
In this case, no separate policy exists for the MailStore service account. The value 'True' of the property <tt>IsDefault</tt> indicates that the default throttling policy of the system applies to the MailStore service account ''[email protected]'' as well. Had the value been 'False', the individual policy <tt>Name</tt> would already have been applied to the MailStore service account.
 
In this case, no separate policy exists for the MailStore service account. The value 'True' of the property <tt>IsDefault</tt> indicates that the default throttling policy of the system applies to the MailStore service account ''[email protected]'' as well. Had the value been 'False', the individual policy <tt>Name</tt> would already have been applied to the MailStore service account.
|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">
 
[PS] C:\Users\Administrator\Desktop>.\policycheck.ps1 [email protected]
 
[PS] C:\Users\Administrator\Desktop>.\policycheck.ps1 [email protected]
 
    
 
    
Line 78: Line 78:
 
</source>
 
</source>
 
<p class="msnote">'''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.</p>
 
<p class="msnote">'''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.</p>
|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">
 
New-ThrottlingPolicy MailStoreServerPolicy -EWSMaxConcurrency Unlimited -EWSMaxSubscriptions Unlimited -EwsCutoffBalance Unlimited -EwsMaxBurst Unlimited -EwsRechargeRate Unlimited -IsServiceAccount -ThrottlingPolicyScope Regular
 
New-ThrottlingPolicy MailStoreServerPolicy -EWSMaxConcurrency Unlimited -EWSMaxSubscriptions Unlimited -EwsCutoffBalance Unlimited -EwsMaxBurst Unlimited -EwsRechargeRate Unlimited -IsServiceAccount -ThrottlingPolicyScope Regular
 
    
 
    
Line 108: Line 108:
 
Remove-ThrottlingPolicy MailStoreServerPolicy
 
Remove-ThrottlingPolicy MailStoreServerPolicy
 
</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">
 
Remove-ThrottlingPolicy MailStoreServerPolicy
 
Remove-ThrottlingPolicy MailStoreServerPolicy
 
</source>}}
 
</source>}}

Revision as of 09:10, 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.