How to check physical adapters from virtual NICs?
In today’s world virtual is reality already. Virtual servers, virtual computers, virtual
attitude of people almost anything now can be virtualized.
How to check people with virtual attitude? PowerShell is not able to help with that, what
PowerShell can help is to check physical NIC from virtual network adapters.
This script below will be useful in an environment where
Hyper-V is installed. It will list physical and virtual NICs.
To check physical adapters the value is true, false if not
physical adapter.
Here’s the script to check and list physical and virtual
network adapters.
$nic = Get-WmiObject -class Win32_NetworkAdapter
Write-Host "Number
of NICs: "$nic.Count
foreach ($nicx
in $nic)
{
"Network
Adapter name is: " + $nicx.name + "Network
Adapter is Physcial: " + $nicx.physicaladapter
}
=====================================
Sample output;
Number of NICs: 10
Network Adapter name is: Microsoft Kernel Debug Network
AdapterNetwork Adapter is Physical: False
Network Adapter name is: VirtualBox Host-Only Ethernet
AdapterNetwork Adapter is Physical: True
Network Adapter name is: Atheros AR9285 Wireless Network
AdapterNetwork Adapter is Physical: True
Network Adapter name is: Qualcomm Atheros AR8152 PCI-E Fast
Ethernet Controller (NDIS 6.30)Network Adapter is Physical: True
Network Adapter name is: Bluetooth Device (RFCOMM Protocol
TDI)Network Adapter is Physical: False
Network Adapter name is: Bluetooth Device (Personal Area
Network)Network Adapter is Physical: True
Network Adapter name is: Microsoft Hosted Network Virtual
AdapterNetwork Adapter is Physical: False
Network Adapter name is: Microsoft ISATAP AdapterNetwork
Adapter is Physical: False
Network Adapter name is: WAN Miniport (SSTP)Network Adapter
is Physical: False
Network Adapter name is: WAN Miniport (IKEv2)Network Adapter
is Physical: False
Comments
Post a Comment