Hyper-V firmware

Changing the Hyper-V firmware boot settings needs to be done with PowerShell. To prevent the build up of entries if a virtual machine is re-built the following command will remove UEFI file and network entries:

Get-VMFirmware -VMName "VMNAME" | % {Set-VMFirmware $_ -BootOrder ($_.BootOrder | ? {($_.BootType -Ne 'Network') -And ($_.BootType -Ne 'File')})}