VMware vSphere Update Manager PowerCLI

Get-PatchBaseline

Synopsis

Retrieves patch baselines.

Syntax

Get-PatchBaseline [[-TargetType] <BaselineTargetType>] [-Patch <Patch>] [-BaselineContentType <BaselineContentType[]>] [-Extension] [[-Name] <String[]>] [-Id <Int32[]>] [<CommonParameters>]
Get-PatchBaseline [[-TargetType] <BaselineTargetType>] [-BaselineContentType <BaselineContentType[]>] [-Extension] [-Server <VIServer[]>] [[-Name] <String[]>] [-Id <Int32[]>] [-Entity <InventoryItem[]>] [-Inherit] [-Recurse] [<CommonParameters>]

Related Commands

New-PatchBaseline
Set-PatchBaseline

Detailed Description

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

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
TargetTypeSpecify 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.falsefalse
PatchSpecify a patch that belong to the patch baseline you want to retrieve.falsetrue (ByValue)
BaselineContentTypeSpecify the content type of the patch baselines you want to retrieve. The valid values are Both, Dynamic, and Static.falsefalse
ExtensionSpecify that you want to retrieve only Extension patch baselines.falsefalse
NameSpecify the names of the patch baselines you want to retrieve.falsefalse
IdSpecify the IDs of the patch baselines you want to retrieve.falsefalse
ServerSpecify 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.falsetrue (ByValue)
EntitySpecify Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, and VApp objects to which the baselines you want to retrieve are attached to.falsetrue (ByValue)
InheritSpecify that you want to retrieve the baselines inherited by the parent inventory entities.falsefalse
RecurseIf set, retrieves the patch baselines attached to the child entities. This parameter can be specified only if the -Entity parameter is set, too.falsefalse

Return Type

VMware.VumAutomation.Types.PatchBaseline[]

Notes

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.


Copyright © 1998 - 2013 VMware, Inc. All rights reserved.