We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c75bf20 commit f63b9a3Copy full SHA for f63b9a3
1 file changed
Scripts/IPv4NetworkScan.ps1
@@ -229,12 +229,12 @@ Begin{
229
230
# Split into groups of 8 bits, convert to Ints, join up into a string
231
$Octets = $CIDR_Bits -split '(.{8})' -ne ''
232
- $Mask = ($Octets | ForEach-Object { [Convert]::ToInt32($_, 2) }) -join '.'
+ $Mask = ($Octets | ForEach-Object -Process {[Convert]::ToInt32($_, 2) }) -join '.'
233
}
234
235
"Mask" {
236
# Convert the numbers into 8 bit blocks, join them all together, count the 1
237
- $Octets = $Mask.ToString().Split(".") | ForEach-Object {[Convert]::ToString($_, 2)}
+ $Octets = $Mask.ToString().Split(".") | ForEach-Object -Process {[Convert]::ToString($_, 2)}
238
$CIDR_Bits = ($Octets -join "").TrimEnd("0")
239
240
# Count the "1" (111111111111111111111111 --> /24)
0 commit comments