File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
samples/manage/azure-sql-db-managed-instance/attach-jumpbox Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -112,13 +112,14 @@ function SetVirtualNetwork
112
112
function ConvertCidrToUint32Array
113
113
{
114
114
param ($cidrRange )
115
- $cidrRangeParts = $cidrRange.Split (@ (" ." , " /" ))
116
- $ipnum = ([Convert ]::ToUInt32($cidrRangeParts [0 ]) -shl 24 ) -bor `
117
- ([Convert ]::ToUInt32($cidrRangeParts [1 ]) -shl 16 ) -bor `
118
- ([Convert ]::ToUInt32($cidrRangeParts [2 ]) -shl 8 ) -bor `
119
- [Convert ]::ToUInt32($cidrRangeParts [3 ])
120
-
121
- $maskbits = [System.Convert ]::ToInt32($cidrRangeParts [4 ])
115
+ $cidrRangeParts = $cidrRange.Split (" /" )
116
+ $ipParts = $cidrRangeParts [0 ].Split(" ." )
117
+ $ipnum = ([Convert ]::ToUInt32($ipParts [0 ]) -shl 24 ) -bor `
118
+ ([Convert ]::ToUInt32($ipParts [1 ]) -shl 16 ) -bor `
119
+ ([Convert ]::ToUInt32($ipParts [2 ]) -shl 8 ) -bor `
120
+ [Convert ]::ToUInt32($ipParts [3 ])
121
+
122
+ $maskbits = [System.Convert ]::ToInt32($cidrRangeParts [1 ])
122
123
$mask = 0xffffffff
123
124
$mask = $mask -shl (32 - $maskbits )
124
125
$ipstart = $ipnum -band $mask
@@ -208,4 +209,4 @@ $templateParameters = @{
208
209
209
210
New-AzureRmResourceGroupDeployment - ResourceGroupName $resourceGroupName - TemplateUri ($scriptUrlBase + ' /azuredeploy.json?t=' + [DateTime ]::Now.Ticks) - TemplateParameterObject $templateParameters
210
211
211
- Write-Host " Deployment completed."
212
+ Write-Host " Deployment completed."
You can’t perform that action at this time.
0 commit comments