Skip to main content

Get-IPrange

SYNOPSIS

Lists IPs within a range, subnet, or CIDR block.

SYNTAX

Get-IPrange [[-IPAddress] <String>] [-CIDR <String>] [-Subnet <String>] [-Start <String>] [-End <String>]
[<CommonParameters>]

DESCRIPTION

Lists IPs within a range, subnet, or CIDR block.

EXAMPLES

EXAMPLE 1

Get-IPrange -IPAddress 192.168.0.3 -subnet 255.255.255.192
Will show all IPs within the 192.168.0.0 space with a subnet mask of 255.255.255.192 (CIDR 26.)

PARAMETERS

-IPAddress

An IP from the subnet mask or CIDR block you want a range for.

Type: String
Parameter Sets: (All)
Aliases: IP, IPs, IPv4, Address, IPv4Address

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CIDR

Specifies what CIDR block notation you want to list IPs from.

Type: String
Parameter Sets: (All)
Aliases: Notation, Block

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Subnet

The subnet mask you want a range for.

Type: String
Parameter Sets: (All)
Aliases: Mask

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Start

Specifies a path to one or more locations.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-End

The ending IP in a range.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Object

NOTES

ALIASES

None.

PLATFORM APPLICABILITY

Windows only. The platform-aware loader does not export this command on Linux or macOS.

POWERSHELL COMPATIBILITY

See PowerShell compatibility for the supported runtime policy. PowerShell 7.6 LTS is preferred.

https://docs.keldor.dev/powershell/keldor/Get-IPrange