Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7dc0906

Browse files
fix
1 parent 5a57e70 commit 7dc0906

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

‎samples/manage/azure-sql-db-managed-instance/prepare-subnet/prepareSubnet.ps1

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@ function Ensure-Login ()
1212
If($context.Subscription -eq $null)
1313
{
1414
Write-Host "Loging in ..."
15-
Try
16-
{
17-
Login-AzureRmAccount -ErrorAction SilentlyContinue | Out-null
18-
}
19-
Catch
15+
If(Login-AzureRmAccount -ErrorAction SilentlyContinue -eq null)
2016
{
2117
Write-Host "Login failed: $_" -ForegroundColor Red
2218
Exit
2319
}
24-
2520
}
2621
Write-Host "User logedin." -ForegroundColor Green
2722
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /