vSphere 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

NameDescriptionRequired?Pipeline InputDefault Value
BaselineSpecifies the patch baseline you want to modify.truetrue (ByValue)
NameSpecifies a new name for the patch baseline.falsefalse
DescriptionSpecifies a description of the patch baseline.falsefalse
IncludePatchFor 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.
falsefalse
ExcludePatchSpecifies 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
SearchPatchStartDateIndicates that you want to include only patches released after the date specified by this parameter.falsefalse
SearchPatchEndDateIndicates that you want to include only patches released before the date specified by this parameter.falsefalse
SearchPatchProductSpecifies software products of the patches you want to include in the new baseline.falsefalse
SearchPatchSeveritySpecifies 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
SearchPatchVendorSpecifies the software vendor of the patches you want to include in the new baseline.falsefalse
SearchPatchCategorySpecifies the category of the patches you want to include in the new baseline. The valid values are SecurityFix, BugFix, Enhancement, and Other.falsefalse
WhatIfIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIndicates 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 © VMware, Inc. All rights reserved.