fix: throw error if no test definitioins after SPO removal
This commit is contained in:
@@ -152,6 +152,9 @@ function Invoke-M365SecurityAudit {
|
||||
if (-not $TenantAdminUrl) {
|
||||
$requiredConnections = $requiredConnections | Where-Object { $_ -ne 'SPO' }
|
||||
$testDefinitions = $testDefinitions | Where-Object { $_.Connection -ne 'SPO' }
|
||||
if ($null -eq $testDefinitions) {
|
||||
throw "No tests to run as no SharePoint Online tests are available."
|
||||
}
|
||||
}
|
||||
}
|
||||
# Establishing connections if required
|
||||
|
Reference in New Issue
Block a user