Skip to content

Instantly share code, notes, and snippets.

@tomtorggler
Created March 24, 2016 19:51
Show Gist options
  • Save tomtorggler/51b9cf64e8509852b60b to your computer and use it in GitHub Desktop.
Save tomtorggler/51b9cf64e8509852b60b to your computer and use it in GitHub Desktop.
# Configure virtual Switches on the Hyper-V Hosts
$vmSwitchParams = @{
CimSession = $cimSessions;
Name = "sw-ext";
NetAdapterName = "Ethernet";
AllowManagementOS = $true
}
New-VMSwitch @vmSwitchParams
# Configure paths for VMs and VHDs
$vmHostParams = @{
CimSession = $cimSessions;
VirtualMachinePath = "C:\ClusterStorage\Volume1\Hyper-V";
VirtualHardDiskPath = "C:\ClusterStorage\Volume1\Hyper-V\VHD"
}
Set-VMHost @vmHostParams
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment