Set-PatchBaseline Command | Vmware PowerCLI Reference

Set-PatchBaseline

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.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
Baseline PatchBaseline named
  • pipeline
Specifies the patch baseline you want to modify.
optional Description String named
Specifies a description of the patch baseline.
optional ExcludePatch Patch[] named
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.
optional IncludePatch Patch[] named
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.
optional Name String named
Specifies a new name for the patch baseline.
optional ProgressAction ActionPreference named
optional SearchPatchCategory UpdateCategory[] named
Specifies the category of the patches you want to include in the new baseline. The valid values are SecurityFix, BugFix, Enhancement, and Other.
optional SearchPatchEndDate DateTime named
Indicates that you want to include only patches released before the date specified by this parameter.
optional SearchPatchProduct String[] named
Specifies software products of the patches you want to include in the new baseline.
optional SearchPatchSeverity PatchSeverity[] named
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.
optional SearchPatchStartDate DateTime named
Indicates that you want to include only patches released after the date specified by this parameter.
optional SearchPatchVendor String[] named
Specifies the software vendor of the patches you want to include in the new baseline.

Output

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.

Related Commands

Patch

This cmdlet initializes staging of patches.

This cmdlet retrieves the available patches.

This cmdlet downloads new patches into the Update Manager repository.

PatchBaseline

This cmdlet retrieves patch baselines.

This cmdlet creates a new patch baseline.

This cmdlet modifies the properties of a patch baseline.