Running below in italics, I get the error below it and I can't really seem to find out what I'm doing wrong and what I need to do. Anyone able to help?
Get-VMHostFirmware -vmhost 192.168.0.15 -BackupConfiguration -Dest
inationPath c:\esxi
+ Get-VMHostFirmware -vmhost 192.168.0.15 -BackupConfiguration -Destina ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMHostFirmware], SystemEr
ror
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_BackupVmHos
tFirmware_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMH
ostFirmware
Does this return anything?
Get-VMHost 192.168.0.15
If yes, try your code like this
Get_VMHost 192.168.0.15 |
Get-VMHostFirmware -BackupConfiguration -DestinationPath c:\esxi
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD, Thanks for the reply. I did that already but just in case I did it again. Here is the output.
PowerCLI C:\> Get-VMHost 192.168.0.15
Name ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz
---- --------------- ---------- ------ ----------- -----------
192.168.0.15 Connected PoweredOn 12 2878 28764
PowerCLI C:\> Get_VMHost 192.168.0.15 |
>> Get-VMHostFirmware -BackupConfiguration -DestinationPath c:\esxi
>>
Get_VMHost : The term 'Get_VMHost' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get_VMHost 192.168.0.15 |
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get_VMHost:String) [], CommandN
otFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PowerCLI C:\> get-vmhostfirmware
VMHost UploadUrl
------ ---------
192.168.0.15 http://192.168.0.15/tmp/configBundle.tgz
PowerCLI C:\> get-vmhostfirmware -BackupConfiguration -DestinationPath c:\esxi
get-vmhostfirmware : 2021-04-22 8:55:26 AM Get-VMHostFirmware
A general
system error occurred: Internal error
At line:1 char:1
+ get-vmhostfirmware -BackupConfiguration -DestinationPath c:\esxi
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMHostFirmware], SystemEr
ror
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_BackupVmHos
tFirmware_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMH
ostFirmware
You are using an underscore (_) instead of a dash (-) in Get-VMHost.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
For that one I mistyped yes, but if I do this you can see it just fails without an error I can use:
PowerCLI C:\> Get-VMHost
Name ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz
---- --------------- ---------- ------ ----------- -----------
192.168.0.15 Connected PoweredOn 12 5200 28764
PowerCLI C:\> Get-VMHostFirmware -BackupConfiguration
cmdlet Get-VMHostFirmware at command pipeline position 1
Supply values for the following parameters:
DestinationPath: c:\esxi
Get-VMHostFirmware : 2021-04-22 10:17:04 AM Get-VMHostFirmware
A general
system error occurred: Internal error
At line:1 char:1
+ Get-VMHostFirmware -BackupConfiguration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMHostFirmware], SystemEr
ror
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_BackupVmHos
tFirmware_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMH
ostFirmware
PowerCLI C:\>
The code I gave earlier is not 2 separate lines, but 1 line of 2 cmdlets connected with the pipeline symbol (|)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Same issue happens if its piped or done separately. Here's the output;
PowerCLI C:\> Get-VMHost 192.168.0.15 | Get-VMHostFirmware -BackupConfiguration
-DestinationPath c:\esxi
Get-VMHostFirmware : 2021-04-22 10:44:13 AM Get-VMHostFirmware
A general
system error occurred: Internal error
At line:1 char:27
+ ... .168.0.15 | Get-VMHostFirmware -BackupConfiguration -DestinationPath ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMHostFirmware], SystemEr
ror
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_BackupVmHos
tFirmware_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMH
ostFirmware
PowerCLI C:\>
Is there a Download folder in the Scratch location on that ESX node?
You might be seeing the same issue as in PowerCLI backup of ESXi configuration no more work... - VMware Technology Network VMTN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference