Fix: Initial connection check when failed would not exit
This commit is contained in:
parent
77b84f819b
commit
8fe24d44bb
|
@ -165,7 +165,7 @@ $Automation = @(
|
||||||
Operation="Get-MgOrganization"
|
Operation="Get-MgOrganization"
|
||||||
Description="Testing connection to Microsoft.Graph"
|
Description="Testing connection to Microsoft.Graph"
|
||||||
Action={param([LogEntry]$log,$Quiet)
|
Action={param([LogEntry]$log,$Quiet)
|
||||||
$org = Get-MgOrganization
|
$org = Get-MgOrganization -ErrorAction Stop
|
||||||
$script:Domain = $org.VerifiedDomains |
|
$script:Domain = $org.VerifiedDomains |
|
||||||
Where-Object IsDefault |
|
Where-Object IsDefault |
|
||||||
Select-Object -ExpandProperty Name
|
Select-Object -ExpandProperty Name
|
||||||
|
|
Loading…
Reference in New Issue