-
-
Save ForumPlayer/b2d5f997554fa8aa51060a040eca0284 to your computer and use it in GitHub Desktop.
Disable Hyper-V VM PXE Boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Mandatory=$true)][string]$VMName | |
) | |
#based on http://serverfault.com/questions/619763/can-pxe-boot-of-hyper-v-vms-be-disabled | |
$old_boot_order = Get-VMFirmware -VMName $VMName | Select-Object -ExpandProperty BootOrder | |
$new_boot_order = $old_boot_order | Where-Object { $_.BootType -ne "Network" } | |
Set-VMFirmware -VMName $VMName -BootOrder $new_boot_order |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment