Get-PatchBaseline Command | Vmware PowerCLI Reference

Get-PatchBaseline

This cmdlet retrieves all patch baselines or those specified by the provided cmdlet parameters.

Syntax

Get-PatchBaseline
[ [-TargetType ] < BaselineTargetType > ]
[-BaselineContentType < BaselineContentType[] > ]
[-Extension ]
[-Id < Int32[] > ]
[-Name < String[] > ]
[-Patch < Patch > ]
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional TargetType BaselineTargetType 1
Specifies the target type of the patch baselines you want to retrieve. The valid value is Host. This parameter is deprecated and will be removed in a following release.
optional BaselineContentType BaselineContentType[] named
Specifies the content type of the patch baselines you want to retrieve. The valid values are Both, Dynamic, and Static.
optional Extension SwitchParameter named
Specifies that you want to retrieve only Extension patch baselines.
optional Id Int32[] named
Specifies the IDs of the patch baselines you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional Name String[] named
Specifies the names of the patch baselines you want to retrieve.
optional Patch Patch named
  • pipeline
Specifies a patch that belongs to the patch baseline you want to retrieve.
optional ProgressAction ActionPreference named
Get-PatchBaseline
[ [-TargetType ] < BaselineTargetType > ]
[-BaselineContentType < BaselineContentType[] > ]
[-Entity < InventoryItem[] > ]
[-Extension ]
[-Id < Int32[] > ]
[-Inherit ]
[-Name < String[] > ]
[-ProgressAction < ActionPreference > ]
[-Recurse ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional TargetType BaselineTargetType 1
Specifies the target type of the patch baselines you want to retrieve. The valid value is Host. This parameter is deprecated and will be removed in a following release.
optional BaselineContentType BaselineContentType[] named
Specifies the content type of the patch baselines you want to retrieve. The valid values are Both, Dynamic, and Static.
optional Entity InventoryItem[] named
  • pipeline
Specifies Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, and VApp objects to which the baselines you want to retrieve are attached to.
optional Extension SwitchParameter named
Specifies that you want to retrieve only Extension patch baselines.
optional Id Int32[] named
Specifies the IDs of the patch baselines you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional Inherit SwitchParameter named
Specifies that you want to retrieve the baselines inherited by the parent inventory entities.
optional Name String[] named
Specifies the names of the patch baselines you want to retrieve.
optional ProgressAction ActionPreference named
optional Recurse SwitchParameter named
If set, retrieves the patch baselines attached to the child entities. This parameter can be specified only if the -Entity parameter is set, too.
optional Server VIServer[] named
  • pipeline
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

Get-VM -Name VMHost | Get-PatchBaseline

Retrieves all patch baselines assigned to the VMHost host.

Example 2

Get-PatchBaseline -Entity VMHost -Inherit -Recurse

Retrieves all patch baselines assigned to the VMHost host and its parent inventory object.

Example 3

$patch = Get-Patch -Id 1 

Get-PatchBaseline -Patch $patch

Retrieves the patch baselines that contain the patch with ID 1.

Example 4

Get-PatchBaseline -Id 1,2,3

Retrieves the patch baselines with IDs 1, 2, and 3.

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.