Fix: Initial connection check when failed would not exit

This commit is contained in:
Gal Szkolnik 2023-07-21 00:01:04 +00:00
parent 77b84f819b
commit 8fe24d44bb
1 changed files with 281 additions and 281 deletions

View File

@ -165,7 +165,7 @@ $Automation = @(
Operation="Get-MgOrganization"
Description="Testing connection to Microsoft.Graph"
Action={param([LogEntry]$log,$Quiet)
$org = Get-MgOrganization
$org = Get-MgOrganization -ErrorAction Stop
$script:Domain = $org.VerifiedDomains |
Where-Object IsDefault |
Select-Object -ExpandProperty Name