mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
fix
This commit is contained in:
@@ -12,9 +12,9 @@ function Ensure-Login ()
|
||||
If($context.Subscription -eq $null)
|
||||
{
|
||||
Write-Host "Loging in ..."
|
||||
If((Login-AzureRmAccount -ErrorAction SilentlyContinue) -eq $null)
|
||||
If((Login-AzureRmAccount -ErrorAction SilentlyContinue -ErrorVariable Errors) -eq $null)
|
||||
{
|
||||
Write-Host "Login failed: $error" -ForegroundColor Red
|
||||
Write-Host ("Login failed: {0}" -f $Errors.Message) -ForegroundColor Red
|
||||
Exit
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user