June 4th, 2013

PowerTip: Use PowerShell to Add Adapter to a Virtual Machine

Doctor Scripto
Scripter

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.

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.