hyper-v powershell 开通虚拟机,配置vlan,配置CPU,内存
for($i=101;$i -lt 111;$i=$i+1) { copy-item d:\hyper-v\vhd\111.vhdx d:\hyper-v\vhd\${i}.vhdx new-vm ${i}server set-vm -name ${i}server -AutomaticStopAction Shutdown -ProcessorCount 12 -MemoryStartupBytes 7GB Add-VMHardDiskDrive -VMName ${i}server -Path d:\hyper-v\vhd\${i}.vhdx Set-VMNetworkAdapterVlan -VMName ${i}server -Access -VlanId $i }