Tuesday 7 January 2014

Some Hyper-V PowerShell Commands for You

Here is the command set to create a vSwitch that does _not_ share the connection with the host OS:


  • New-VMSwitch -Name vSwitch -NetAdapterName vSwitch -AllowManagementOS 0

Note the zero to indicate no sharing with the host OS.

The -NetAdapterName value is the name of the team we created for the VMs.

Installing features and forcing the local source files is an important thing to do otherwise one may wait a long time while the node or nodes, or a standalone host, try and pull from Microsoft's download servers only to fail much later in the game.

In this case we are installing the RSAT-Clustering feature (in our snip the -IncludeAllSubFeature is missing as we later discovered).


  • Install-WindowsFeature RSAT-Clustering -Source wim:d:\sources\install.wim:2 -IncludeAllSubFeature -Restart

Even with the installer pulling the needed files from the locally attached storage (flash drive) this one takes a while. We know we are successful when the node reboots.

Note that we are indicating INDEX 2 for the installer to pull from. That index is for the GUI version of the the OS. If we try and pull the source files from CORE INDEX 1 we will eventually end up with a failed result. And, given how long this process takes it is rather painful to discover just what the installer was looking for in the first place. :(

Philip Elder
Microsoft Cluster MVP
Co-Author: SBS 2008 Blueprint Book

Chef de partie in the SMBKitchen
Find out more at
Third Tier: Enterprise Solutions for Small Business

No comments: