Get all IPV4 address with power shell RRS feed

  • Question

  • Hello

    I need to be able to output all IPV4 address to one line in txt file. Here is what I am using currently:

    $IP = (get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object { $_.Ipaddress.length -gt 1 }).ipaddress[0]


    When I run this command on a computer that has wired network adapter it works fine. When I run this same command against a computer that has wireless adaptor I get nothing in the output file. Can you tell me what I am doing wrong or point to a web resource please.


    Thursday, February 12, 2015 5:33 PM


All replies