PowerTip: Use PowerShell to Find Network Adapters


Summary: Use Windows PowerShell to find network adapters associated with running virtual machines.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see the network adapters that are associated with all running
           virtual machines on my Windows 8.1 laptop that runs Hyper-V?

Hey, Scripting Guy! Answer Use the Get-VM cmdlet to look for running virtual machines. Then pipe the results to the 
           Get-VMNetworkAdapter cmdlet, for example:

(Get-VM).where({$_.state -eq 'running'}) | Get-VMNetworkAdapter

Note  This command must be run with Admin rights. It also uses the Where method syntax
introduced in Windows PowerShell 4.0.

Comments (0)

Skip to main content