Tests that an IP address is in use on the local computer.
Test-IPAddress [-IPAddress] <IPAddress> [<CommonParameters>]
Sometimes its useful to know if an IP address is being used on the local computer. This function does just that.
| Name | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| IPAddress | IPAddress | The IP address to check. |
true | false |
Test-IPAddress -IPAddress '10.1.2.3'
Returns true if the IP address 10.1.2.3 is being used on the local computer.
Test-IPAddress -IPAddress '::1'
Demonstrates that you can use IPv6 addresses.
Test-IPAddress -IPAddress ([Net.IPAddress]::Parse('10.5.6.7'))
Demonstrates that you can use real System.Net.IPAddress objects.