VMware vSphere Update Manager PowerCLI

Get-Patch

Synopsis

Retrieves the available patches.

Syntax

Get-Patch [[-SearchPhrase] <String[]>] [-Id <Int32[]>] [-Baseline <Baseline[]>] [-Severity <PatchSeverity[]>] [-Product <String[]>] [-After <DateTime>] [-Before <DateTime>] [-TargetType <PatchTargetType[]>] [-Vendor <String[]>] [-InstallationImpact <PatchInstallationImpact[]>] [-BundleType <PatchBundleType[]>] [-Category <UpdateCategory[]>] [<CommonParameters>]
Get-Patch [-Server <VIServer[]>] [[-SearchPhrase] <String[]>] [-Id <Int32[]>] [-Severity <PatchSeverity[]>] [-Product <String[]>] [-After <DateTime>] [-Before <DateTime>] [-TargetType <PatchTargetType[]>] [-Vendor <String[]>] [-InstallationImpact <PatchInstallationImpact[]>] [-BundleType <PatchBundleType[]>] [-Category <UpdateCategory[]>] [<CommonParameters>]

Related Commands

Download-Patch
Stage-Patch

Detailed Description

Retrieves all available patches or those specified by the provided cmdlet parameters.

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
SearchPhraseSpecify phrases that are contained in the Name, Description, Id, and Vendor properties of the patches you want to retrieve. Use commas to separate multiple phrases.falsefalse
IdSpecify the IDs of the patches you want to retrieve.falsefalse
BaselineSpecifies baselines to which the patches you want to retrieve belong.falsetrue (ByValue)
SeveritySpecify the severity of the patches you want to retrieve. The valid values are NotApplicable, Low, Moderate, Important, Critical, HostGeneral, and HostSecurity.falsefalse
ProductSpecify the names of software products for which you want to retrieve patches.falsefalse
AfterIndicate that you want to retrieve only patches released after the date specified by this parameter.falsefalse
BeforeIndicate that you want to retrieve only patches released before the date specified by this parameter.falsefalse
TargetTypeSpecifies the target type of the patches you want to retrieve. The valid value is Host. This parameter is deprecated and will be removed in a following release.falsefalse
VendorSpecify the vendors of the patches you want to retrieve.falsefalse
InstallationImpactSpecify the installation impact of the patches you want to retrieve. The valid values are HostdRestart, Reboot, MaintenanceMode, MaintenanceModeHostdRestart, MaintenanceModeInstall, MaintenanceModeUpdate, and FaultToleranceCompatibiliy.falsefalse
BundleTypeSpecify the bundle type of the patches you want to retrieve. The valid values are Patch, Rollup, Update, Extension, and Upgrade.falsefalse
CategorySpecify the categories of the patches you want to retrieve. The valid values are SecurityFix, BugFix, Enhancement, and Other.falsefalse
ServerSpecify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers.falsetrue (ByValue)

Return Type

VMware.VumAutomation.Types.Patch[]

Notes

Examples

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

Get-Patch -SearchPhrase "ESX40-MMODE" -Severity critical -Product "esx 4.0.*" -After 10.11.2007

Retrieves the critical esx 4.0.* patches released after 10.11.2007, that contain "ESX40-MMODE" in their properties.

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

Get-Baseline -Id 2| Get-Patch

Retrieves all Patch objects included in the baseline with ID 2.

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

Get-Patch -Severity critical -InstallationImpact Reboot

Retrieves the critical host patches whose installation reboots the host.


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