Created
January 15, 2019 08:17
-
-
Save rvrsh3ll/ef414159b47491bd8a3dc4e2c18ffe6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-CidrHostCount { | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory)] | |
[ValidateRange(1,32)] | |
$Cidr | |
) | |
Begin { | |
} # End Begin. | |
Process { | |
"Number of hosts for /$Cidr`: $('{0:N0}' -f [System.Math]::Pow(2,32-$Cidr))" | |
} # End Process. | |
End { | |
} # End End. | |
} # End Function: Get-CidrHostCount. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment