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)

Business@contoso.ie is the mailbox being shared.
anna.grimm@contoso.ie is the account that has the access rights.

In EOL PowerShell

Remove-MailboxPermission -Identity “Business@contoso.ie” -User “anna.grimm@contoso.ie” -AccessRights FullAccess                                                   

Confirm

Are you sure you want to perform this action?

Removing mailbox permission Identity:”Business@contoso.ie” for user “anna.grimm@contoso.ie” 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
WARNING

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 “Business@contoso.ie” -User “anna.grimm@contoso.ie” -AccessRights FullAccess –Confirm:$false –BypassMasterAccountSid

Re-add the permissions but without Automapping

Add-MailboxPermission -Identity “Business@comtoso.ie” -User “anna.grimm@contoso.ie” -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 service@contoso.de | Format-List SingleItemRecoveryEnabled,RetainDeletedItemsFor

or use

Get-mailbox service@contoso.de | fl *retention*,*retain*

Set New Settings

Set-Mailbox -Identity service@contoso.de -SingleItemRecoveryEnabled $false -RetainDeletedItemsFor 1

#Purges folder deletes after 1 day

Delete Items in Dumpster

Search-mailbox -identity service@contoso.de -SearchDumpsterOnly -DeleteContent

View Recoverable items in Dumpster

Get-MailboxFolderStatistics service@contoso.de -FolderScope RecoverableItems | Format-List Name,FolderAndSubfolderSize