Create and attach the virtual disk
A dynamically expanding **VHDX** starts small and grows with use. Create it on a **data disk**, not on the system partition you are testing against.
New-Item -ItemType Directory D:\TestVHD -Force | Out-Null
New-VHD -Path D:\TestVHD\test.vhdx -SizeBytes 60GB -Dynamic
Mount-VHD -Path D:\TestVHD\test.vhdx
Get-Disk | Where-Object Location -like '*test.vhdx*' | Select-Object Number,Size,PartitionStyle