VMware vSphere Update Manager PowerCLI

Set-PatchBaseline

Synopsis

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

Get-PatchBaseline
New-PatchBaseline

Detailed Description

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

NameDescriptionRequired?Pipeline InputDefault Value
BaselineSpecify the patch baseline you want to modify.truetrue (ByValue)
NameSpecify a new name for the patch baseline.falsefalse
DescriptionSpecify a description of the patch baseline.falsefalse
IncludePatchFor static baselines, specify 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, specify 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.
falsefalse
ExcludePatchSpecify 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.falsefalse
SearchPatchStartDateIndicate that you want to include only patches released after the date specified by this parameter.falsefalse
SearchPatchEndDateIndicate that you want to include only patches released before the date specified by this parameter.falsefalse
SearchPatchProductSpecify software products of the patches you want to include in the new baseline.falsefalse
SearchPatchSeveritySpecify 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.falsefalse
SearchPatchVendorSpecify the software vendor of the patches you want to include in the new baseline.falsefalse
SearchPatchCategorySpecify the category of the patches you want to include in the new baseline. The valid values are SecurityFix, BugFix, Enhancement, and Other.falsefalse
WhatIfIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIndicate that the cmdlet asks for confirmation before running.falsefalse

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 - 2013 VMware, Inc. All rights reserved.