functions/private/Test-ExchangeOnlineModuleConnectivity.ps1

function Test-ExchangeOnlineModuleConnectivity {
    [CmdletBinding()]
    param()

    Write-Verbose "Testing for 'ExchangeOnline' connectivity."
    $importedCommands = Get-Command -ListImported -Verbose:$false

    $searchUnifiedAuditLogCommandFound = "Search-UnifiedAuditLog" -in $importedCommands.Name

    return $searchUnifiedAuditLogCommandFound
}