PowerCLI Reference

Get-Baseline

Synopsis

This cmdlet retrieves baselines.

Syntax

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

Related Commands

Online version
Add-EntiryBaseline
New-PatchBaseline
Remove-Baseline
Remove-EntityBaseline
Set-PatchBaseline

Detailed Description

This cmdlet retrieves the baselines specified by the provided cmdlet parameters. There are two default dynamic patch baselines (Critical Host Patches (Predefined), and Non-Critical Host Patches(Predefined)) and three upgrade baselines (VMware Tools Upgrade to Match Host(Predefined), VM Hardware Upgrade to Match Host (Predefined),and VA Upgrade to Latest (Predefined)). You cannot edit or delete default baselines.

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
TargetTypeSpecifies the target type of the baselines you want to retrieve. The valid values are VM, Host, and VA.falsefalse
BaselineTypeSpecifies the type of the baselines you want to retrieve. The valid values are Patch (patch baselines) and Upgrade (upgrade baselines).falsefalse
BaselineContentTypeSpecifies the content type of the baselines you want to retrieve. The valid values are Dynamic, Static, and Both.falsefalse
ServerSpecifies 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)
NameSpecifies the names of the baselines you want to retrieve.falsefalse
IdSpecifies the IDs of the 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.
falsefalse
EntitySpecifies Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, and VApp objects to which the baselines you want to retrieve are attached.falsetrue (ByValue)
InheritSpecifies that you want to retrieve the baselines inherited by the parent inventory entities.falsefalse
RecurseSpecifies that you want to retrieve the baselines attached to the child inventory entities.falsefalse

Return Type

VMware.VumAutomation.Types.Baseline[]

Notes

Examples

-------------- Example 1 --------------

Get-Baseline -Name *critical*

Retrieves all baselines that contain "critical" in their names.

-------------- Example 2 --------------

Get-Baseline -TargetType Host -BaselineType Upgrade

Retrieves the available host upgrade baselines on the default server.

-------------- Example 3 --------------

Get-Baseline -Entity VM -Inherit

Retrieves the baselines that are attached directly to the VM virtual machine or are inherited by its parent objects.

-------------- Example 4 --------------

Get-Baseline -TargetType VM -BaselineType Upgrade

Retrieves the default baselines (VMware Tools Upgrade to Match Host and VM Hardware Upgrade to Match Host).


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