Syntax
New-PatchBaseline [-Server <VIServer>] [-Name] <String> [-TargetType <BaselineTargetType>] [-Description <String>] -Static -IncludePatch <Patch[]> [-Extension] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet creates a new patch baseline. Patch baselines can be applied to either hosts or virtual machines. Depending on the patch criteria you select, patch baselines can be either dynamic or static (fixed). You can specify explicitly the patches you want to include in the baseline through the IncludePatch parameter. Also, you can use the SearchPath* 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
Return Type
VMware.VumAutomation.Types.PatchBaselineNotes
Examples
-------------- Example 1 --------------
$patch = Get-Patch -SearchPhrase "nexus" -Severity critical -Product "embeddedESX 4.0.0" -After 10.11.2009 New-PatchBaseline -Name Baseline -IncludePatch $patch -TargetType Host
Creates a new patch baseline named "Baseline" that includes patches with the specified parameters.
-------------- Example 2 --------------
$patches = Get-Patch -SearchPhrase "ESX40-MMODE" New-PatchBaseline -Name Baseline -Description "This is my first baseline" -Static -IncludePatch $patches -TargetType Host
Creates a static baseline for host patches, which contain the word "ESX40-MMODE" in their properties.
-------------- Example 3 --------------
$patches = Get-Patch -SearchPhrase "ESX40-MMODE" -Severity critical -Product "esx 4.0.*" -After 10.11.2007 New-PatchBaseline -Name Baseline -Description "Contains all esx 4.0 critical patches after 10.06.2007" -Static -IncludePatch $patches -TargetType Host
Creates a static baseline for critical host patches, that have "ESX40-MMODE" in their names, and product name starting with "esx 4.0."
-------------- Example 4 --------------
New-PatchBaseline -Dynamic -Name Baseline -TargetType Host -SearchPatchVendor *VMware*
Creates a dynamic patch baseline containing host patches from vendors whose names contains "VMware".