Find All Exchange Server Mailboxes Associated with a Throttling Policy

When you attempt to remove an Exchange Server throttling policy you may encounter the following error.

[PS] C:\>Get-ThrottlingPolicy PolicyName | Remove-ThrottlingPolicy
Throttling policy “CN=PolicyName,CN=Global Settings,CN=Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=com” can’t be removed because there are currently users associated with the policy. Reset the throttling policy for those users using Set-Mailbox, and then try again.
+ CategoryInfo : InvalidOperation: (:) [Remove-ThrottlingPolicy], CannotRemoveAss…PolicyException
+ FullyQualifiedErrorId : 1481B319,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveThrottlingPolicy

To quickly locate all of the mailboxes associated with the throttling policy you can run the following command in the Exchange Management Shell.

[PS] C:\>Get-Mailbox -ResultSize Unlimited | where {$_.ThrottlingPolicy -eq "PolicyName"}

Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
AppMailbox                appmailbox           exserver01       unlimited

To see a list of other available throttling policies run the following command.

[PS] C:\>Get-ThrottlingPolicy | select Name

Name
----
DefaultThrottlingPolicy_ed6a2169-7da8-4ge2-a593-885d2t360144
BESPolicy
PolicyName

Associate the mailbox with a different throttling policy using Set-Mailbox.

[PS] C:\>Set-Mailbox DSAdmin -ThrottlingPolicy DefaultThrottlingPolicy_ed6a2169-7da8-4ge2-a593-885d2t360144

Or for multiple mailboxes you can pipe the results from the earlier Get-Mailbox command into Set-Mailbox.

[PS] C:\>get-mailbox -ResultSize Unlimited | where {$_.ThrottlingPolicy -eq "PolicyName"} | Set-Mailbox -ThrottlingPolicy DefaultThrottlingPolicy_ed6a2169-7da8-4ge2-a593-885d2t360144

The old throttling policy can then be removed.

[PS] U:\Documents\Scripts\test>Get-ThrottlingPolicy PolicyName | Remove-ThrottlingPolicy

Confirm
Are you sure you want to perform this action?
Removing throttling policy "PolicyName".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): y

Comments

  1. Val Levin says

    It is worth noting that if you want to do the reverse – find which policy applies to a specific mbox, use the following:

    Get-ThrottlingPolicyAssociation -Identity XXX | findstr “ThrottlingPolicy”

  2. Matt H says

    My phone team is doing a cisco unity upgrade. Per cisco documentation we have to set up an impersonation account and a throttling policy. Per the “Cisco” documentation we have to create a throttling policy and apply it to any mailbox that Cisco is attempting to put voice mail in through EWS. Per the documentation, microsoft requires throttling on the mailboxes itself and not the service account for Exchange 2013.

    Is this true? If it is, how do we get this policy on all mailboxes and also make sure it applies to any mailboxes created in the future? I wish Microsoft would have allowed you to only apply the policy to the service account created for the impersonation account.

    I have looked at various archiving products and besadmin and it still appears you apply the policy to the service accounts and not all user mailboxes. Who’s documentation is correct?

  3. Matt G says

    Hi, i’m trying to remove my BES throttlign policy. No mailbox are associated with the policy, but the command says there are:

    [PS] C:\>Get-ThrottlingPolicy | select Name

    Name
    —-
    DefaultThrottlingPolicy_853283f2-d70d-4cab-b9d6-d4b9c7235fd9
    BESPolicy
    MSEPolicy
    ConnectionUnifiedMessagingServicesPolicy

    [PS] C:\>Get-Mailbox -ResultSize Unlimited | where {$_.ThrottlingPolicy -eq “BESPolicy”}

    [PS] C:\>Get-ThrottlingPolicy BESPolicy | Remove-ThrottlingPolicy
    Throttling policy “CN=BESPolicy,CN=Global Settings,CN=ABC,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=rdi,DC=
    msft” can’t be removed because there are currently users associated with the policy. Reset the throttling policy for th
    ose users using Set-Mailbox, and then try again.
    + CategoryInfo : InvalidOperation: (:) [Remove-ThrottlingPolicy], CannotRemoveAss…PolicyException
    + FullyQualifiedErrorId : C163FE33,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveThrottlingPolicy
    + PSComputerName : gdc-msexchhc-02.abc.msft

    thoughts?

        • Matt G says

          Checked on the other mailbox types and they don’t have a throttlingpolicy assosciated:

          [PS] C:\>get-mailbox -Arbitration | Select-Object name,ThrottlingPolicy

          Name ThrottlingPolicy
          —- —————-
          SystemMailbox{1f05a927-c06e-4ba1-813e-457ff6a2d46c}
          SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}
          FederatedEmail.4c1f4d8b-8179-4148-93bf-00a95fa1e042

          [PS] C:\>get-mailbox -Archive | Select-Object name,ThrottlingPolicy

          Name ThrottlingPolicy
          —- —————-
          Matt G ConnectionUnifiedMessagingServicesPolicy

          [PS] C:\>get-mailbox -RemoteArchive | Select-Object name,ThrottlingPolicy
          [PS] C:\>

  4. Matt G says

    I finally figured this out (or at least a work-around). I used:

    Get-ThrottlingPolicyAssociation -resultsize unlimited | Select-Object Name,ThrottlingPolicyId | Export-Csv C:\u
    sers\admin-mgoli\Desktop\get-throttlingpolicy2.csv

    this gave me a bunch of information for all AD objects and their throttlingpolicy. I used that and found that our BES service account (even though the mailbox was disabled, still had the BESPolicy associated to it. I purged the mailbox from disconnected mailboxes, still couldn’t remove the policy. I finally went to the service account using adsiedit and found the msExchThrottlingPolicyDN was still pointed at the BESPolicy throttling policy. after I cleared that using ADSIEDIT, I was able to execute the remove-throttlingpolicy command to remove the policy.

  5. Matt G says

    I certainly would have done that before if I would have known. One would think that mail disabling would remove the throttling policy along with the other exchange attributes that are removed.

  6. Roberto says

    Hello.

    I was having the same issue (not able to delete the policy).
    Here is what I did:
    As I had not removed the BESAdmin account from my AD (disabled only), I set it to active once more and then I assoiciated the BESAdmin exchange account back to the AD account, I then was able to run the commands and was able to remove the policy. (I then disabled the email and the AD account once more)

    Sorry, english is my second language.

  7. Carol Ostos says

    I’m in the process of retiring our Blackberry Server, here are the steps I followed:

    a) Remove-ADPermissions for Besadmin account
    b) Remove Management Role Assignment “EWS” (created for BES)
    c) Remove Throttling Policy, as some of you mentioned, you cant delete a policy if one or more mailboxes have associations with this policy. If that’s the case, you could use ADSI Edit to clear the Throttling Policy value or you could also run Set-Mailbox besadmin -ThrottlingPolicy $null (this should clear the value) and allow for the policy to be removed.
    d) Disable-Mailbox
    e) Disable Account

    Hope this helps!

    Thank you guys!

Leave a Reply

Your email address will not be published. Required fields are marked *