All scripts
Microsoft 365 775

Get-SharedMailboxAutoMappingReport

Lists shared mailboxes and whether automapping is enabled for their delegates, useful for tracking down why a shared mailbox is or is not showing up automatically in someone's Outlook.

Get-SharedMailboxAutoMappingReport.ps1
<#
.SYNOPSIS
    Reports automapping status for delegates on shared mailboxes.

.DESCRIPTION
    For every shared mailbox, lists Full Access delegates and whether
    automapping was enabled when that permission was granted, since Outlook
    only auto adds a shared mailbox when AutoMapping was true at grant time.

.EXAMPLE
    .\Get-SharedMailboxAutoMappingReport.ps1

.NOTES
    Requires ExchangeOnlineManagement and an active Connect-ExchangeOnline session.

.AUTHOR
    Shehryar Hassan
#>

$sharedMailboxes = Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails SharedMailbox
$report = foreach ($mbx in $sharedMailboxes) {
    $perms = Get-MailboxPermission -Identity $mbx.Identity |
        Where-Object { $_.AccessRights -contains "FullAccess" -and $_.User -notlike "NT AUTHORITY\*" }
    foreach ($perm in $perms) {
        [pscustomobject]@{
            SharedMailbox = $mbx.DisplayName
            Delegate      = $perm.User
            AutoMapped    = $perm.IsInherited -eq $false -and $perm.AutoMapping
        }
    }
}

$report | Sort-Object SharedMailbox | Format-Table -AutoSize

Read it before you run it, and test in a safe tenant first.