powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-VMHostFirmware



NAME
Set-VMHostFirmware

SYNOPSIS
Configures hosts firmware settings.

SYNTAX
Set-VMHostFirmware [-VMHost] [-BackupConfiguration] -DestinationPath [-Server ] [-W
hatIf] [-Confirm] []

Set-VMHostFirmware [-VMHost] [-ResetToDefaults] [-Server ] [-WhatIf] [-Confirm] [ meters>]

Set-VMHostFirmware [-VMHost] [-Restore] [-SourcePath ] [-Force] [-HostCredential ]
[-HostUser ] [-HostPassword ] [-Server ] [-WhatIf] [-Confirm] [ >]


DESCRIPTION
Configures hosts firmware settings.
If the BackupConfiguration parameter is set, backups the host configuration and downloads the bundle to the specifi
ed 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, u
se the Get-VMHostFirmware cmdlet instead.


PARAMETERS
-VMHost
Specify the host whose firmware you want to configure (it must be an ESX visor).

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-BackupConfiguration
The Backup functionality of Set-VMHostFirmware is deprecated and scheduled for removal. For making backups, use
the Get-VMHostFirmware cmdlet instead. Indicate that you want to backup the host firmware configuration and do
wnload the bundle to the specified DestinationPath.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DestinationPath
Specify a destination path where to download the host configuration backup bundle if the BackupConfiguration pa
rameter is set.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
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

-ResetToDefaults
Indicate that you want to reset all configuration settings, including the "admin" password, to the factory defa
ults. The host is rebooted immediately. The host needs to be in a maintenance in order to perform this operatio
n.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Restore
Indicate that you want to restore the configuration of the host to the one that is specified in the provided bu
ndle. 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 hos
t needs to be in a maintenance mode in order to perform this operation.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-SourcePath
Specify 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
Accept pipeline input? false
Accept wildcard characters? false

-Force
Indicate that you want to apply the configuration even if the bundle is mismatched. Use this parameter in combi
nation with the Restore parameter.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HostCredential
Specify the credential object you want to use for the authentication with the host when uploading a firmware co
nfiguration bundle. Do not use this parameter if -HostUser and -HostPassword are specified.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HostUser
Specify a username for the authentication with the host when uploading a firmware configuration bundle.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HostPassword
Specify a password for the authentication with the host when uploading a firmware configuration bundle.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
HostFirmware or HostFirmwareBundle


NOTES


This functionality is available on ESXi Embedded only.

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

C:\PS>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 defaul
t path through HTTP by using the upload URL specified in the firmware bundle object:

$bundle = Get-VMHostFirmware

$uploadUrl = $bundle.UploadUrl





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

C:\PS>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 --------------

C:\PS>Set-VMHost -VMHost Host -State 'Maintenance'

Set-VMHostFirmware -VMHost Host -ResetToDefaults


Reset the host configuration to the factory default settings.





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

C:\PS>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 -HostPasswo
rd pass


Restore multiple hosts firmware by specifying the firmware bundle as a source path directory. The command determine
s which bundle is needed for each host by the bundle name.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-VMHostFirmware.html
Get-VMHostFirmware