## PowerCLI Reference

# Set-PatchBaseline

## Synopsis

This cmdlet modifies the properties of a patch baseline.

Syntax

Set-PatchBaseline [-Baseline] <PatchBaseline> [-Name <String>] [-Description <String>] [-IncludePatch <Patch[]>] [-ExcludePatch <Patch[]>] [-SearchPatchStartDate <DateTime>] [-SearchPatchEndDate <DateTime>] [-SearchPatchProduct <String[]>] [-SearchPatchSeverity <PatchSeverity[]>] [-SearchPatchVendor <String[]>] [-SearchPatchCategory <UpdateCategory[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-PatchBaseline
New-PatchBaseline

Detailed Description

This cmdlet modifies the properties of a patch baseline. You can specify explicitly the patches you want to include in the baseline through the IncludePatch parameter. Also, you can use the SearchPatch* parameters to filter the patches you want to include by their properties, product, vendor, severity, and release date. Note that patches that have been excluded through the ExcludePatch parameter will not be included even if they correspond to the filter defined by the SearchPatch* parameters.

Parameters

Name | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | ---
Baseline | Specifies the patch baseline you want to modify. | true | true (ByValue) |
Name | Specifies a new name for the patch baseline. | false | false |
Description | Specifies a description of the patch baseline. | false | false |
IncludePatch | For static baselines, specifies the patches you want to include in the baseline. These patches will be added in the CurrentPatches property of the returned baseline object. For dynamic baselines, specifies patches you want to add to the baseline in addition to the patches specified by the search criteria parameters. The patches supplied through the IncludePatch parameter are stored in the InclPatches property of the baseline. These patches are also added in the baseline's CurrentPatches property that contains the patches specified by the search criteria parameters and the patches provided by the IncludePatch parameter. Patches specified by the ExcludePatch parameter are not included in the CurrentPatches property of a baseline. | false | false |
ExcludePatch | Specifies the software patches you want to exclude from the dynamic baseline. Once excluded, a patch cannot be included even if it corresponds to the filter defined by the SearchPatch* parameters. | false | false |
SearchPatchStartDate | Indicates that you want to include only patches released after the date specified by this parameter. | false | false |
SearchPatchEndDate | Indicates that you want to include only patches released before the date specified by this parameter. | false | false |
SearchPatchProduct | Specifies software products of the patches you want to include in the new baseline. | false | false |
SearchPatchSeverity | Specifies the severity of the patches you want to include in the new baseline. The available values are NotApplicable, Low, Moderate, Important, Critical, HostGeneral, and HostSecurity. | false | false |
SearchPatchVendor | Specifies the software vendor of the patches you want to include in the new baseline. | false | false |
SearchPatchCategory | Specifies the category of the patches you want to include in the new baseline. The valid values are SecurityFix, BugFix, Enhancement, and Other. | false | false |
WhatIf | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Confirm | Indicates that the cmdlet asks for confirmation before running. | false | false |

Return Type

VMware.VumAutomation.Types.PatchBaseline

Notes

Examples

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

    Get-PatchBaseline -Name "Test Baseline" | Set-PatchBaseline -Name "Old Test Baseline"

Retrieves a baseline and and changes its name.

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

    Get-PatchBaseline -Name Baseline | Set-PatchBaseline SearchPatchEndDate 1.1.2002"

Retrieves a baseline and sets its SearchPatchEndDate property.

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

    $patches = Get-Patch -Id 1,2,3

    $baseline = Get-PatchBaseline -Name Baseline

    Set-PatchBaseline -Baseline $baseline -IncludePatch $patches

Updates the patches included in the baseline.

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

    $baseline = Get-PatchBaseline -Name Baseline

    Set-PatchBaseline -Baseline $baseline -SearchPatchVendor *micro*"

Sets the baseline SearchPatchVendor property using wildcards.

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