Repository navigation
Test PublicIP
AzureDevOps edited this page Sep 26, 2026
·
2 revisions
Use to determine if a given IP address is within the IPv4 public address space.
Test-PublicIP [-IP] <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Returns $true or $false for a given IP address string depending on whether or not it is within the public IP address space, i.e it is not within the private IP address ranges.
Test-PublicIP -IP 8.8.8.8
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).