You should try this to get all IPv4 addresses assigned to your system:
Get-WMIObject win32_NetworkAdapterConfiguration |
Where-Object { $_.IPEnabled -eq $true } |
Foreach-Object { $_.IPAddress } |
Foreach-Object { [IPAddress]$_ } |
Where-Object { $_.AddressFamily -eq 'Internetwork' } |
Foreach-Object { $_.IPAddressToString }
ReTweet this Tip!
Posted
Apr 21 2010, 08:00 AM
by
ps1