File tree Expand file tree Collapse file tree
samples/manage/azure-sql-db-managed-instance/attach-jumpbox Expand file tree Collapse file tree Original file line number Diff line number Diff 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
138139function 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 {
You can’t perform that action at this time.
0 commit comments