Share via

Cannot AddressBookPolicy

Anonymous
2017-08-25T08:56:06+00:00

Hi,

I tried removing AddressBookPolicy, but it always fails with error This address book policy "SDHLIST-ABP" can not be removed because it is being used by users. Before you can remove this

Address book policy, make sure that no users are linked to it.

     + CategoryInfo: InvalidOperation: (SDHLIST-ABP: ADObjectId) [Remove-AddressBookPolicy], InvalidOperationE

    Xception

     + FullyQualifiedErrorId: [Server = HKXPR0401MB1847, RequestId = 8ce93752-516c-4ee7-9d29-5752e1288eb2, TimeStamp = 8/25/20

    17 8:52:52 AM] [FailureCategory = Cmdlet-InvalidOperationException] 227C715F, Microsoft.Exchange.Management.SystemCon

   FigurationTasks.RemoveAddressBookPolicy

     + PSComputerName: outlook.office365.com

When run the Get-Mailbox command -ResultSize Unlimited | Where $ ._ AddressBookPolicy -eq "SDHLIST-ABP",

No user is still using the addressbookpolicy.

Please be informed, Is there any other error in me running deletion.

Thank you.

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

16 answers

Sort by: Most helpful
  1. Anonymous
    2017-08-31T17:25:43+00:00

    Hi Kurniadi,

    Actually, after running Get-Mailbox -SoftDeletedMailbox | Where AddressBookPolicy -eq <AddressBookPolicyName> , we can get the actual result.

    Please check these softdeleted mailboxes in the UI, and see if there is any address book policy assigned to them. If yes, please remove the connection with the address book policy. To remove an ABP from a user’s mailbox, you can use the Mailbox features page of the mailbox’s properties or the Set-Mailbox cmdlet.

    You can also run the **Get-Mailbox | Where AddressBookPolicy -eq <AddressBookPolicyName>**and check the outcome. See if there is any mailbox linked to the address book policy.

    Thanks,

    Lance

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2017-08-28T16:45:58+00:00

    Hi Lance,

    Thankyou for your reply

    This is screenshot

    I use exchange online on Office365.

    Thank you

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-08-28T16:16:19+00:00

    Hi Kurniadi,

    To further look into the issue, could you please capture a screenshot about the original commands output for analysis?

    Meanwhile, please let me know if you have an Exchange server deployed.

    Thanks,

    Lance

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2017-08-25T18:21:55+00:00

    Hi Lance,

    I run script

    $userList = Get-ADUser -Filter * -Properties msExchAddressBookPolicyLink | select name,distinguishedname,msExchAddressBookPolicyLink -ExpandProperty msExchAddressBookPolicyLink

    I Got error 

    Get-ADUser : The term 'Get-ADUser' is not recognized as the name of a cmdlet, function, script file, or operable

    program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    At line:1 char:13

    • $userList = Get-ADUser -Filter * -Properties msExchAddressBookPolicyL ...

    +             ~~~~~~~~~~

        + CategoryInfo          : ObjectNotFound: (Get-ADUser:String) [], CommandNotFoundException

        + FullyQualifiedErrorId : CommandNotFoundException

    What is wrong? I have run import-module msonline.

    Thank you

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2017-08-25T11:32:18+00:00

    Hi Kurniadi,

    Address book policy can be assigned to not only user mailbox, but also Distribution Groups, security group, mail contacts, mail public folders etc. Try this command to check if you can find something.

    Get-Recipient | ? {$_.AddressBookPolicy -eq "XXX"}

    If the result shows nothing, please run the script below: 

    $LogPath = "C:\PS\ScriptOutput\Exch-ABP.txt"

    $userList = Get-ADUser -Filter * -Properties msExchAddressBookPolicyLink | select name,distinguishedname,msExchAddressBookPolicyLink -ExpandProperty msExchAddressBookPolicyLink

    foreach ($user in $userList) {

        $name = $user.name

        $dn = $user.distinguishedname

        $abp = $user.msExchAddressBookPolicyLink

        Add-Content $LogPath "$name+$dn+$abp"

    }

    Then dumped the results into an excel sheet to analyse them.  You should find the problematic users in seconds.

    You can also check if there are any disabled users (pending deletion).

    Thanks,

    Lance

    Was this answer helpful?

    0 comments No comments