something exciting

Some information about the exciting thing

Table of contents generated with markdown-toc



    Short function to display the details for a CIDR range

    This function was created to output the details of a CIDR range using the API from

    Get-CidrIPRange -cidrAddress -prefix 24

    Address       =
    Network       = / 24
    Netmask       =
    Broadcast     =
    Wildcard Mask =
    Hosts Bits    = 8
    Max. Hosts    = 254   (2^8 - 2)
    Host Range    = { - }

    cidrAddress [string]
    prefix [int]

    Output is simple and of content type text

    Author:     Luke Leigh



[cmdletbinding(DefaultParameterSetName = 'default')]
param([Parameter(Mandatory = $True,
        HelpMessage = "Please enter a network address e.g.",
        ValueFromPipeline = $false,
        ValueFromPipelineByPropertyName = $True)]
    [Parameter(Mandatory = $True,
        HelpMessage = "Please enter a prefix e.g. 29",
        ValueFromPipeline = $false,
        ValueFromPipelineByPropertyName = $True)]

begin {


process {
    $cidrRange = $cidrAddress + '/' + $prefix
    Invoke-RestMethod -Method Default -Uri "$CidrRange"

end {


Back to Top


Please feel free to copy parts of the script or if you would like to download the entire script, simple click the download button. You can download the complete repository in a zip file by clicking the Download link in the menu bar on the left hand side of the page.

Report Issues

You can report an issue or contribute to this site on GitHub. Simply click the button below and add any relevant notes. I will attempt to respond to all issues as soon as possible.


Back to Top