Scenario: A user no longer has fullaccess to a shared mailbox BUT the shared mailbox still attempts to reconnect via Autodiscover in the Outlook profile.
Solution: The following scriptlets will detect the autodiscover links associated with the problem mailbox and attempt to remove them. Note, you can remove all backlinks, or specific backlinks.
$u = "Steve" $u_DN = Get-ADUser $u | select -ExpandProperty DistinguishedName $d = Get-ADUser $u -Properties msExchDelegateListBL | select msExchDelegateListBL #To remove all backLinks $d.msexchdelegatelistBL | %{Set-ADUser $_ -Remove @{msExchDelegateListLink = "$u_dn"}} #To Remove specific BackLinks $SharedMailboxToRemove $d | Where msexchdelegatelistBL -like "*$SharedMailboxToRemove*" | Select -ExpandProperty msexchdelegatelistBL | %{Set-ADUser $_ -Remove @{msExchDelegateListLink = "$u_dn"}}