Public/Configuration/Remove-FocusedInboxAllMailboxes.ps1

function Remove-FocusedInboxAllMailboxes {
    param (
        [string]$TenantId
    )

    try {
        Write-ModuleLog -Message "Removing focused inbox from all mailboxes" -Level Info -Component 'Remove-FocusedInboxAllMailboxes'
        Connect-CustomerExchange -CustomerTenantId $TenantId
        Get-Mailbox -ResultSize Unlimited | Set-FocusedInbox -FocusedInboxOn $false

        Write-ModuleLog -Message "Focused inbox removed from all mailboxes" -Level Info -Component 'Remove-FocusedInboxAllMailboxes'
    }
    catch {
        throw $_
    }

}