PowerTip: Create a Virtual Switch in Hyper-V with Windows PowerShell

Doctor Scripto

Summary: Use built-in Hyper-V cmdlets to create virtual switches.

Hey, Scripting Guy! Question How can I use Windows PowerShell in Hyper-V Server 2012 R2 to create a virtual switch on a private LAN?

Hey, Scripting Guy! Answer Use the New-VMSwitch cmdlet.
          For example, to create a virtual switch called SuperSecretLan that you can bind virtual machines to, use:

NEW-VMSWITCH –Name ‘SuperSecretLan’ –SwitchType Private


Discussion is closed.

Feedback usabilla icon