Author Posts

November 10, 2015 at 1:47 pm

Is there a way to grab a list of the 'physical' NICs on a Virtual or physical machine that will report accurately with teamed NICs or ignore things like VPN created NICs?

November 10, 2015 at 3:32 pm

It will just be working out a property that can define what exactly you're after. For example in PowerShell 4.0 (8.1/WinServer 2012R2) or later you can use:

Get-NetAdapter -Physical

going back to older style (2.0/3.0) you can always use:

Get-WmiObject -class Win32_Networkadapter | Where {($_.PhysicalAdapter -eq $true)}

On my machine this still returns my VPN connection so I would need to create the criteria to filter this out. IE:

Get-WmiObject -class Win32_Networkadapter | Where {($_.PhysicalAdapter -eq $true) -and ($_.Manufacturer -eq 'Intel') }

Someone might know of some other property determine true physical adapters. Hoep this helps.

November 10, 2015 at 4:00 pm

You could use the PNPDeviceID. If it starts with PCI, It's plug n play is via the PCI bus and by association, hardware.

Get-WmiObject -class Win32_Networkadapter | Where {($_.PNPDeviceID -like 'PCI*')}

November 11, 2015 at 6:24 am

Ah thank both of you guys so much!