1) When you create a new VM using the New-VM Command and adding the -NewVHDPath and the -NewVHDSizeBytes switches, how do you also set the newly created VHD disk type to Dynamic of Fixed? can you do this when running the command or do you have to take 2 separate steps? like using add-vhd ?
2) how do you find the alerts when you set minimum IOPS to say 25 for a VM, if the storage system/Hyper-V cant provide that type of performance, where are those alerts logged?
I took a look at this and the best I could do for a 1 liner is;
New-VM -Name TEST -NoVHD -Generation "2" | Add-VMHardDiskDrive -Path (New-VHD -Path "E:\Hyper-V\Virtual Hard Disks\Test.vhdx" -SizeBytes 25GB -Dynamic).Path -MinimumIOPS "2500"
As for alerts do you have the Microsoft-Windows-Hyper-V-VMMS/Admin log? On 2016 I get event ID 32930, if not set the IOPS value to something unachievable and check the event viewer 'Administrative Events'