Repository navigation
Get Subnet
Returns subnet details for the local IP address, or a given network address and mask.
Get-Subnet [[-IP] <String>] [[-MaskBits] <Object>] [-Force] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Use to get subnet details for a given network address and mask, including network address, broadcast address, network class, address range, host addresses and host address count.
Get-Subnet 10.1.2.3/24
Returns the subnet details for the specified network and mask, specified as a single string to the -IP parameter.
Get-Subnet 192.168.0.1 -MaskBits 23
Returns the subnet details for the specified network and mask.
Get-Subnet
Returns the subnet details for the current local IP.
'10.1.2.3/24','10.1.2.4/24' | Get-Subnet
Returns the subnet details 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: Object
Parameter Sets: (All)
Aliases: CIDR
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseUse to force the return of the full list of host IP addresses regardless of the subnet size (skipped by default for subnets larger than /16). HostAddressCount is always calculated and returned, regardless of subnet size or whether -Force is used.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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).