PowerTip: Use PowerShell to Add Adapter to a Virtual Machine

Doctor Scripto

Summary: Use Windows PowerShell to add a network adapter to a virtual machine.

Hey, Scripting Guy! Question How do I add a network adapter to my virtual machine on Hyper-V?

Hey, Scripting Guy! Answer Use the ADD-VMNetworkAdapter cmdlet:

ADD-VMNetworkAdapter -vmname “My Virtual Machine” -switchname “ProdVlan”

Remember, you can always get a list of Hyper-V networks with Get-VMSwitch.


Discussion is closed.

Feedback usabilla icon