Patching ESX/ESXi using Powercli

By | 20th July 2014

Applying ESX patching using Powercli

I always had problem remembering the fields needed for patching ESXi using Powercli. This time I thought I will write it down.

Get the command as a variable $cli so that it is easy.

PowerCLI C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> $cli=Get-VMHost myhost.cloudtick.com | Get-EsxCli

Run the command to understand the fields

PowerCLI C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> $cli.software.profile.update

TypeNameOfValue : VMware.VimAutomation.ViCore.Util10Ps.EsxCliExtensionMethodOverloadDefinitions : {vim.EsxCLI.software.profile.update.InstallationResult up
date(boolean allowdowngrades, string[] depot, boolean dry
run, boolean force, boolean maintenancemode, boolean noli
veinstall, boolean nosigcheck, string profile, string pro
xy)}
MemberType : CodeMethod
Value : vim.EsxCLI.software.profile.update.InstallationResult upd
ate(boolean allowdowngrades, string[] depot, boolean dryrun, boolean force, boolean maintenancemode, boolean noliveinstall, boolean nosigcheck, string profile, string prox
y)
Name : update
IsInstance : True

The actual command to run the command, putting $null value wherever we do not want to pass any value.

The command to run patching command.

PowerCLI C:Program Files (x86)VMwareInfrastructurevSphere PowerCLI> $cli.software.profile.update($null, “<PatchDepot>”, $null, $null, $null, $null, $null, “ESXi-5.0.0-20130304001-standard”, $null)

Leave a Reply

Your email address will not be published. Required fields are marked *