< Back

Test-CIPAddress

Sun Jan 12, 2020 11:24 pm

NAME Test-CIPAddress



SYNOPSIS

Tests that an IP address is in use on the local computer.





SYNTAX

Test-CIPAddress [-IPAddress] <IPAddress> [<CommonParameters>]





DESCRIPTION

Sometimes its useful to know if an IP address is being used on the local computer. This function does just that.





PARAMETERS

-IPAddress <IPAddress>

The IP address to check.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Test-CIPAddress -IPAddress '10.1.2.3'



Returns `true` if the IP address `10.1.2.3` is being used on the local computer.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Test-CIPAddress -IPAddress '::1'



Demonstrates that you can use IPv6 addresses.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Test-CIPAddress -IPAddress ([Net.IPAddress]::Parse('10.5.6.7'))



Demonstrates that you can use real `System.Net.IPAddress` objects.











RELATED LINKS

Test-CIPAddress