PowerShell Logo Small


This is the built-in help made by Microsoft for the command 'Set-VMFirmware', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.


Sets the firmware configuration of a virtual machine.


Set-VMFirmware [-VMName] <String[]> [-BootOrder <VMComponentObject[]>] [-ComputerName <String[]>] [-EnableSecureBoot <OnOffState>] [-FirstBootDevice <VMComponentObject>]
[-Passthru] [-PreferredNetworkBootProtocol <IPProtocolPreference>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-VMFirmware [-VM] <VirtualMachine[]> [-BootOrder <VMComponentObject[]>] [-EnableSecureBoot <OnOffState>] [-FirstBootDevice <VMComponentObject>] [-Passthru]
[-PreferredNetworkBootProtocol <IPProtocolPreference>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-VMFirmware [-VMFirmware] <VMFirmware[]> [-BootOrder <VMComponentObject[]>] [-EnableSecureBoot <OnOffState>] [-FirstBootDevice <VMComponentObject>] [-Passthru]
[-PreferredNetworkBootProtocol <IPProtocolPreference>] [-Confirm] [-WhatIf] [<CommonParameters>]

Search powershellhelp.space


The Set-VMFirmware cmdlet sets the firmware configuration of a Generation 2 virtual machine.



Online Version: http://go.microsoft.com/fwlink/?LinkId=280118




Example 1

PS C:\> Set-VMFirmware "Test VM" -EnableSecureBoot On

This example enables secure boot functionality on the virtual machine “Test VM”.

Example 2

PS C:\> Set-VMFirmware "Test VM" -FirstBootDevice $vmNetworkAdapter

This example sets the virtual machine “Test VM” to boot off of the VM network adapter object stored in $vmNetworkAdapter. This object was acquired using get-VMNetworkAdapter.

Example 3

PS C:\> Set-VMFirmware "Test VM" -BootOrder $vmNetworkAdapter, $vmHardDiskDrive

Sets the boot order for the virtual machine “Test VM”. $vmNetworkAdapter contains a VM Network Adapter object (acquired using get-VMNetworkAdapter) and $vmHardDiskDrive
contains a VM hard disk object (acquired using get-VMHardDiskDrive). Any existing boot entries not specified by this command will be removed from the virtual machine.