@LiamRetrams I recently published a function related to this in my FogApi Powershell module (see my signature)
I posted an example of using it in a snapin to change a host’s boot order to pxe boot as the first boot option
https://forums.fogproject.org/topic/16784/powershell-snapin-no-output-non-error?_=1729112272355
as @george1421 stated this is a windows issue, part of the oobe process involves changing the boot order. But you can utilize bcdedit to fix it. I’ve made an attempt at creating a universal option with my Set-WinToBootToPxe function, It works for me on some Asus motherboard based systems, I’d be very interested to hear if it works on custom Gigabyte builds as well.
See also
https://github.com/darksidemilk/FogApi/blob/master/FogApi/Public/Set-WinToBootToPxe.ps1 https://fogapi.readthedocs.io/en/latest/commands/Set-WinToBootToPxe/ https://github.com/darksidemilk/FogApi/blob/master/FogApi/Public/Get-WinBcdPxeID.ps1 https://fogapi.readthedocs.io/en/latest/commands/Get-WinBcdPxeId/