< Back

Set-VMHostFirmware

Sun Jan 19, 2020 7:10 pm

NAME Set-VMHostFirmware



SYNOPSIS

This cmdlet configures hosts firmware settings.





SYNTAX

Set-VMHostFirmware [-VMHost] <VMHost[]> [-BackupConfiguration] -DestinationPath <String> [-Server <VIServer[]>]

[-Confirm] [-WhatIf] [<CommonParameters>]



Set-VMHostFirmware [-VMHost] <VMHost[]> [-Force] [-HostCredential <PSCredential>] [-HostPassword <SecureString>]

[-HostUser <String>] [-Restore] [-Server <VIServer[]>] [-SourcePath <String>] [-Confirm] [-WhatIf]

[<CommonParameters>]



Set-VMHostFirmware [-VMHost] <VMHost[]> [-ResetToDefaults] [-Server <VIServer[]>] [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

This cmdlet configures hosts firmware settings. If the BackupConfiguration parameter is set, backups the host

configuration and downloads the bundle to the specified DestinationPath. In order to use the Restore and

ResetToDefaults parameters, the host needs to be in maintenance mode. The Backup functionality of

Set-VMHostFirmware is deprecated and scheduled for removal. For making backups, use the Get-VMHostFirmware cmdlet

instead.





PARAMETERS

-BackupConfiguration [<SwitchParameter>]

The Backup functionality of Set-VMHostFirmware is deprecated and scheduled for removal. For making backups,

use the Get-VMHostFirmware cmdlet instead.



Indicates that you want to backup the host firmware configuration and download the bundle to the path

specified by the DestinationPath parameter.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DestinationPath <String>

Specifies a destination path where to download the host configuration backup bundle if the BackupConfiguration

parameter is set.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Indicates that you want to apply the configuration even if the bundle is mismatched. Use this parameter in

combination with the Restore parameter.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-HostCredential <PSCredential>

Specifies the credential object you want to use for authenticating with the host when uploading a firmware

configuration bundle. Do not use this parameter if the HostUser and HostPassword parameters are specified.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-HostPassword <SecureString>

Specifies a password for the authenticating with the host when uploading a firmware configuration bundle.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-HostUser <String>

Specifies a username for authenticating with the host when uploading a firmware configuration bundle.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResetToDefaults [<SwitchParameter>]

Indicates that you want to reset all configuration settings, including the "admin" password, to the factory

defaults. The host is rebooted immediately. The host needs to be in a maintenance in order to perform this

operation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Restore [<SwitchParameter>]

Indicates that you want to restore the configuration of the host to the one that is specified in the provided

bundle. The bundle is uploaded to the URL retrieved via Get-VMHostFirmware. This method resets all

configuration options, including the "admin" password, to the values in the bundle. The host is rebooted

immediately. The host needs to be in maintenance mode in order to perform this operation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Server <VIServer[]>

Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this

parameter, the command runs on the default servers. For more information about default servers, see the

description of Connect-VIServer.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-SourcePath <String>

Specifies the path to the host configuration backup bundle you want to restore. The bundle is uploaded to an

URL address which you can retrieve by using the Get-VMHostFirmware cmdlet.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VMHost <VMHost[]>

Specifies the host whose firmware you want to configure (it must be an ESX visor).



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-Confirm [<SwitchParameter>]

If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,

the cmdlet runs without asking for user confirmation.



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more modified HostFirmware or HostFirmwareBundle objects







NOTES





This functionality is available on ESXi Embedded only.



-------------------------- Example 1 --------------------------



Set-VMHost -VMHost Host -State 'Maintenance'



Set-VMHostFirmware -VMHost Host -Restore



Restore the host firmware by using the default path for the firmware bundle. You can store the bundle to the

default path through HTTP by using the upload URL specified in the firmware bundle object:



$bundle = Get-VMHostFirmware



$uploadUrl = $bundle.UploadUrl

-------------------------- Example 2 --------------------------



Set-VMHost -VMHost Host -State 'Maintenance'



Set-VMHostFirmware -VMHost Host -Restore -SourcePath c:\\bundleToRestore.tgz -HostUser user -HostPassword pass



Restore the host firmware by specifying a firmware bundle as a source path.

-------------------------- Example 3 --------------------------



Set-VMHost -VMHost Host -State 'Maintenance'



Set-VMHostFirmware -VMHost Host -ResetToDefaults



Reset the host configuration to the factory default settings.

-------------------------- Example 4 --------------------------



Get-VMHostFirmware -VMHost Host1, Host2 -BackupConfiguration -DestinationPath c:\\StoredBundles



Set-VMHost -VMHost Host1, Host2 -State 'Maintenance'



Get-VMHost -Name Host1, Host2 | Set-VMHostFirmware -Restore -SourcePath c:\\StoredBundles -HostUser user

-HostPassword pass



Restore multiple hosts firmware by specifying the firmware bundle as a source path directory. The command

determines which bundle is needed for each host by the bundle name.



RELATED LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... mware.html

Get-VMHostFirmware