PowerTip: Use PowerShell to Find Network Adapters

Doctor Scripto

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.

0 comments

Discussion is closed.

Feedback usabilla icon