We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7cf6140 commit e9eb4bdCopy full SHA for e9eb4bd
1 file changed
samples/manage/azure-sql-db-managed-instance/prepare-subnet/prepareSubnet.ps1
@@ -12,9 +12,9 @@ function Ensure-Login ()
12
If($context.Subscription -eq $null)
13
{
14
Write-Host "Loging in ..."
15
- If((Login-AzureRmAccount -ErrorAction SilentlyContinue) -eq $null)
+ If((Login-AzureRmAccount -ErrorAction SilentlyContinue -ErrorVariable $error) -eq $null)
16
17
- Write-Host "Login failed: $_" -ForegroundColor Red
+ Write-Host "Login failed: $error" -ForegroundColor Red
18
Exit
19
}
20
0 commit comments