Repository navigation
Test PrivateIP
AzureDevOps edited this page Sep 25, 2026
·
2 revisions
Use to determine if a given IP address is within the IPv4 private address space ranges.
Test-PrivateIP [-IP] <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Returns $true or $false for a given IP address string depending on whether or not is is within the private IP address ranges.
Test-PrivateIP -IP 172.16.1.2
True
The IP address to test.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
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).