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:
@@ -14,7 +14,7 @@ function Ensure-Login ()
|
||||
Write-Host "Loging in ..."
|
||||
If((Login-AzureRmAccount -ErrorAction SilentlyContinue -ErrorVariable Errors) -eq $null)
|
||||
{
|
||||
Write-Host ("Login failed: {0}" -f $Errors.Message) -ForegroundColor Red
|
||||
Write-Host ("Login failed: {0}" -f $Errors[0].Exception.Message) -ForegroundColor Red
|
||||
Break
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ function Select-SubscriptionId {
|
||||
Catch
|
||||
{
|
||||
Write-Host "Subscription selection failed: $_" -ForegroundColor Red
|
||||
Exit
|
||||
Break
|
||||
}
|
||||
}
|
||||
Write-Host "Subscription selected." -ForegroundColor Green
|
||||
@@ -57,7 +57,7 @@ function Load-VirtualNetwork {
|
||||
else
|
||||
{
|
||||
Write-Host "Virtual network not found." -ForegroundColor Red
|
||||
Exit
|
||||
Break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ function Load-VirtualNetworkSubnet {
|
||||
else
|
||||
{
|
||||
Write-Host "Subnet not found." -ForegroundColor Red
|
||||
Exit
|
||||
Break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ function Verify-Subnet {
|
||||
Else
|
||||
{
|
||||
Write-Host "Failed Validation - Minimum supported subnet size is /28." -ForegroundColor Red
|
||||
Exit
|
||||
Break
|
||||
}
|
||||
If(
|
||||
($subnet.IpConfigurations.Count -eq 0) -and
|
||||
@@ -109,7 +109,7 @@ function Verify-Subnet {
|
||||
Else
|
||||
{
|
||||
Write-Host "Failed Validation - Subnet is already in use." -ForegroundColor Red
|
||||
Exit
|
||||
Break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user