Use PowerShell to Identify Your Real Network AdapterI was able to quickly take the following command, and, get basic information for my NIC.
When I run this command, I get a large chunk of information like this:Get-WmiObject win32_networkadapterconfiguration -Filter ipenabled = "true"
In my case, I just needed the actual IPv4 address, so, I used this approach:DHCPEnabled : TrueIPAddress : {192.168.1.2}DefaultIPGateway : {192.168.1.1}DNSDomain :ServiceName : abcexpressDescription : Intel(R) 8123LM Gigabit Network ConnectionIndex : 7
The beauty here is that you can zero in on a specific property (the results of wrapping in parentheses and using .IPAddress) then pipelining to a Where-Object cmdlet to test if the value can be typed as a [System.Version] object. Since IPv4 addresses pass as [System.Version] objects, this is a foolproof way to find an IP address without having to parse a lot of data or use complex expressions.(Get-WmiObject win32_networkadapterconfiguration -Filter ipenabled = "true").IPAddress |Where-Object {$_ -as [System.Version]}