Remove EOL Automapping

Automapping is an Exchange & Exchange Online feature which automatically opens mailboxes with Full Access permissions in a delegate’s Outlook client.

Remove the access permissions. This also removes automapping.

Logon to Azure EOL (with MFA) is the mailbox being shared. is the account that has the access rights.

In EOL PowerShell

Remove-MailboxPermission -Identity “” -User “” -AccessRights FullAccess                                                   


Are you sure you want to perform this action?

Removing mailbox permission Identity:”” for user “” with access rights “‘FullAccess'”.

[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is “Y”): select A

You might get this error

Can’t remove the access control entry on the object “User” for the user account because the ACE doesn’t exist on the object.

So use

Remove-MailboxPermission -Identity “” -User “” -AccessRights FullAccess –Confirm:$false –BypassMasterAccountSid

Re-add the permissions but without Automapping

Add-MailboxPermission -Identity “” -User “” -AccessRights FullAccess -AutoMapping:$false

Mailbox Rules

Get rules list

Get-InboxRule -Mailbox <mailbox name or alias>

Get detail on each rule

Get-InboxRule -Mailbox <mailbox name or alias>  -Identity “<rule name>” | Select -Property *

Disable Rule

Disable-Inboxrule -identity “<Rule name>” -mailbox <mailbox name or alias>

Remove Rule

Remove-Inboxrule -identity <Rule Name> -mailbox <mailbox name or alias>

Purge Mailbox Deleted Items Folder

Get current Settings

Get-Mailbox | Format-List SingleItemRecoveryEnabled,RetainDeletedItemsFor

or use

Get-mailbox | fl *retention*,*retain*

Set New Settings

Set-Mailbox -Identity -SingleItemRecoveryEnabled $false -RetainDeletedItemsFor 1

#Purges folder deletes after 1 day

Delete Items in Dumpster

Search-mailbox -identity -SearchDumpsterOnly -DeleteContent

View Recoverable items in Dumpster

Get-MailboxFolderStatistics -FolderScope RecoverableItems | Format-List Name,FolderAndSubfolderSize