Skip to content

Commit 3dc3072

Browse files
committed
More info messages...
1 parent e3cae26 commit 3dc3072

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,18 @@ function LoadVirtualNetwork {
7878
)
7979
Write-Host("Loading virtual network '{0}' in resource group '{1}'." -f $virtualNetworkName, $resourceGroupName)
8080
$virtualNetwork = Get-AzureRmVirtualNetwork -ResourceGroupName $resourceGroupName -Name $virtualNetworkName -ErrorAction SilentlyContinue
81-
If($null -ne $virtualNetwork.Id)
81+
$id = $virtualNetwork.Id
82+
If($null -ne $id)
8283
{
83-
Write-Host "Virtual network with id $virtualNetwork.Id is loaded." -ForegroundColor Green
84+
Write-Host "Virtual network with id $id is loaded." -ForegroundColor Green
8485
If($virtualNetwork.VirtualNetworkPeerings.Count -gt 0) {
8586
Write-Host "Virtual network is loaded, but it should not have peerings." -ForegroundColor Red
8687
}
8788
return $virtualNetwork
8889
}
8990
else
9091
{
91-
Write-Host "Virtual network cannot be found." -ForegroundColor Red
92+
Write-Host "Virtual network $virtualNetworkName cannot be found." -ForegroundColor Red
9293
Break
9394
}
9495
}
@@ -138,7 +139,7 @@ function ConvertUInt32ToIPAddress
138139
function CalculateNextAddressPrefix
139140
{
140141
param($virtualNetwork, $prefixLength)
141-
Write-Host "Calculating address prefix..."
142+
Write-Host "Calculating address prefix with length $prefixLength..."
142143
$startIPAddress = 0
143144
ForEach($addressPrefix in $virtualNetwork.AddressSpace.AddressPrefixes)
144145
{

0 commit comments

Comments
 (0)