external help file: PoshToolbox-help.xml Module Name: PoshToolbox online version: https://gitlab.com/PoshAJ/PoshToolbox/-/blob/main/docs/New-IPSubnet.md schema: 2.0.0
Creates an IPSubnet object.
New-IPSubnet [-InputObject] <String[]> [<CommonParameters>]
New-IPSubnet -IPAddress <String> -IPPrefix <Int32> [<CommonParameters>]
The New-IPSubnet
function creates an IPSubnet object that represents a set of IP addresses.
Specifies an IP subnet in CIDR notation.
Type: String[]
Parameter Sets: InputObject
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies an IP address in dotted-quad notation for IPv4 and in colon-hexadecimal notation for IPv6.
Type: String
Parameter Sets: IPAddress
Aliases: Address
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies an IP prefix as the number of bits within the host section of the IP address.
Type: Int32
Parameter Sets: IPAddress
Aliases: Prefix
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This function supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
You can pipe a string that contains an IP subnet in CIDR notation to this function.
Returns an IPAddress object for each resolved subnet.