Skip to content

Commit 90c2ef4

Browse files
fix
1 parent 50d5225 commit 90c2ef4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ function Ensure-Login ()
1212
If($context.Subscription -eq $null)
1313
{
1414
Write-Host "Loging in ..."
15-
If((Login-AzureRmAccount -ErrorAction SilentlyContinue) -eq $null)
15+
If((Login-AzureRmAccount -ErrorAction SilentlyContinue -ErrorVariable Errors) -eq $null)
1616
{
17-
Write-Host "Login failed: $error" -ForegroundColor Red
17+
Write-Host ("Login failed: {0}" -f $Errors.Message) -ForegroundColor Red
1818
Exit
1919
}
2020
}

0 commit comments

Comments
 (0)