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,16 +12,11 @@ function Ensure-Login ()
|
||||
If($context.Subscription -eq $null)
|
||||
{
|
||||
Write-Host "Loging in ..."
|
||||
Try
|
||||
{
|
||||
Login-AzureRmAccount -ErrorAction SilentlyContinue | Out-null
|
||||
}
|
||||
Catch
|
||||
If(Login-AzureRmAccount -ErrorAction SilentlyContinue -eq null)
|
||||
{
|
||||
Write-Host "Login failed: $_" -ForegroundColor Red
|
||||
Exit
|
||||
}
|
||||
|
||||
}
|
||||
Write-Host "User logedin." -ForegroundColor Green
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user