Hyper-V: Remove virtual machine firmware file bootmgfw.efi

By | November 13, 2016

I often use virtual machines to test OSD, and usually I use same virtual machine again and again, because I don't want to re-create my virtual machine and add it to my SCCM test collections. Yeah, I know I am lazy. 🙂 After reinstall the same virtual machine many times, you will notice there are many bootmgfw.efi in your VM settings-->Firmware.

Here is the simple way delete all the bootmgfw.efi file at once. Use powershell.

After this, you will see your virtual machine settings became like this, and you can change back "Hard Drive" as the first boot.

 

Remember: "However, you have still lost that file entry which Windows setup created. It can be re-created in WMI (not through PowerShell directly) assuming you know (can calculate) the correct firmware device path. An easier way is using bcdboot inside the guest operating system once it is booted"

Hyper-V generation 2 virtual machines – part 2

 

Leave a Reply

Your email address will not be published. Required fields are marked *