This commit is contained in:
Srđan Božović
2018-08-21 10:12:06 +02:00
parent b1c988635a
commit 85cb49aa55
@@ -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
}
}