We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50d5225 commit 90c2ef4Copy full SHA for 90c2ef4
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 Errors) -eq $null)
16
17
- Write-Host "Login failed: $error" -ForegroundColor Red
+ Write-Host ("Login failed: {0}" -f $Errors.Message) -ForegroundColor Red
18
Exit
19
}
20
0 commit comments