Copy-Patch Command | Vmware PowerCLI Reference

Copy-Patch

This cmdlet initializes staging of patches. Staging allows you to download patches from the Update Manager server to the ESXi hosts, without applying the patches immediately. This functionality is supported only for VMHost, Cluster, and Datacenter objects.

Syntax

Copy-Patch
-Entity < InventoryItem[] >
[-Baseline < PatchBaseline[] > ]
[-ExcludePatch < Patch[] > ]
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Entity InventoryItem[] named
  • pipeline
Specifies VMHost, Cluster, and Datacenter objects for which you want to stage patches.
optional Baseline PatchBaseline[] named
  • pipeline
Specifies patch baselines you want to stage.
optional ExcludePatch Patch[] named
  • pipeline
Specifies the patches you want to exclude from staging.
optional ProgressAction ActionPreference named
optional RunAsync SwitchParameter named
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the -RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console.
optional Server VIServer[] named
Specifies the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers.

Output

Examples

Example 1

Copy-Patch -Entity Host

Stages all patches included in baselines attached to the entity named Host.

Related Commands

Patch

This cmdlet initializes staging of patches.

This cmdlet retrieves the available patches.

This cmdlet downloads new patches into the Update Manager repository.

PatchBaseline

This cmdlet retrieves patch baselines.

This cmdlet creates a new patch baseline.

This cmdlet modifies the properties of a patch baseline.