You should use this to retrieve all IP addresses assigned to your computer:
Get-WMIObject win32_NetworkAdapterConfiguration |
Where-Object {$_.IPEnabled -eq $true } |
Foreach-Object { $_.IPAddress }
Where-Object {$_.IPEnabled -eq $true } |
Foreach-Object { $_.IPAddress }
Get-WMIObject win32_NetworkAdapterConfiguration |
Where-Object {$_.IPEnabled -eq $true } |
Foreach-Object { $_.IPAddress }
Where-Object {$_.IPEnabled -eq $true } |
Foreach-Object { $_.IPAddress }
You can also access remote systems and check their IP addresses since Get-WMIObject supports the -ComputerName parameter.