Scripts/HyperV.ps1


Set-VMProcessor -VMName HV01 -ExposeVirtualizationExtensions $true



$VMName = "MDT01"
$DriveLetter = "D"
$Size = "50GB"

$Path = "G:\Hyper-V\MDT01\Virtual Hard Disks"
Set-Location $Path

New-VHD -Path "$($VMName)-$($DriveLetter).vhdx" -SizeBytes $Size #-Fixed

Add-VMHardDiskDrive -VMName $VMName -Path "$($VMName)-$($DriveLetter).vhdx"