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