## 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

Name | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | ---
TargetType | Specifies the target type of the baselines you want to retrieve. The valid values are VM, Host, and VA. | false | false |
BaselineType | Specifies the type of the baselines you want to retrieve. The valid values are Patch (patch baselines) and Upgrade (upgrade baselines). | false | false |
BaselineContentType | Specifies the content type of the baselines you want to retrieve. The valid values are Dynamic, Static, and Both. | false | false |
Server | 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. | false | true (ByValue) |
Name | Specifies the names of the baselines you want to retrieve. | false | false |
Id | Specifies 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. | false | false |
Entity | Specifies Template, VirtualMachine, VMHost, Cluster, Datacenter, Folder, and VApp objects to which the baselines you want to retrieve are attached. | false | true (ByValue) |
Inherit | Specifies that you want to retrieve the baselines inherited by the parent inventory entities. | false | false |
Recurse | Specifies that you want to retrieve the baselines attached to the child inventory entities. | false | false |

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.