Repository navigation
Get SubnetHostAddress
Returns the list of usable host IP addresses for a given network address and mask.
Get-SubnetHostAddress [[-IP] <String>] [[-MaskBits] <Int32>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Unlike Get-Subnet, this always calculates and returns the full list of host addresses regardless of subnet size, since that's this cmdlet's only job. It still warns (but does not refuse) when the subnet is larger than /16, since generating the full list for a very large subnet can take some time.
Get-SubnetHostAddress 10.1.2.3/24
Returns the list of host addresses for the specified network and mask.
Get-SubnetHostAddress -IP 192.168.0.1 -MaskBits 12
Returns the list of host addresses for the specified (large) network and mask. A warning is shown that this may take some time, but the addresses are still returned.
'10.1.2.3/24','10.1.2.4/24' | Get-SubnetHostAddress
Returns the list of host addresses for two specified networks.
The network IP address or IP address with subnet mask via slash notation.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseThe numerical representation of the subnet mask.
Type: Int32
Parameter Sets: (All)
Aliases: CIDR
Required: False
Position: 2
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False{{Fill ProgressAction Description}}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).