Edit

Share via


Get-WsusUpdate

Gets the WSUS update object with details about the update.

Syntax

ID

Get-WsusUpdate
    -UpdateId <Guid>
    [-UpdateServer <IUpdateServer>]
    [-RevisionNumber <Int32>]
    [<CommonParameters>]

Scoped

Get-WsusUpdate
    [-UpdateServer <IUpdateServer>]
    [-Classification <WsusUpdateClassifications>]
    [-Approval <WsusApprovedState>]
    [-Status <WsusUpdateInstallationState>]
    [<CommonParameters>]

Description

The Get-WsusUpdate cmdlet gets the Windows Server Update Services (WSUS) update object with details about the update. This cmdlet requires the update unique identifier (GUID) or a set of filter criteria such as classification, approval and status as parameter.

The Get-WsusUpdate cmdlet can be called in two ways:

  • Passing in the Update ID (GUID) and RevisionNumber. This cmdlet returns a single update matching the specified Update ID and revision number.
  • Passing in filter parameters. These parameters include Classification, Approval, and Status. One or more updates matching the specified criteria are returned.

Examples

Example 1: Get updates by status

PS C:\> Get-WsusUpdate -Classification All -Approval Unapproved -Status FailedOrNeeded

This command gets all unapproved updates with a status of failed or needed.

Example 2: Get critical unapproved updates

PS C:\> Get-WsusUpdate -Classification Critical -Approval Unapproved -Status Any
Title                         Classification                    Installed/Not Applicable  Approved
Percentage
-----                         --------------                ----------------------------- --------
Windows XP Update Package,    Critical Updates                                            NotApproved
October 25, 2001

This command gets all critical unapproved updates.

Parameters

-Approval

Specifies the approved state of the one or more updates to be returned. The acceptable values for this parameter are:

  • Unapproved
  • Declined
  • Approved
  • AnyExceptDeclined

Parameter properties

Type:WsusApprovedState
Default value:None
Accepted values:Approved, Unapproved, AnyExceptDeclined, Declined
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Classification

Specifies the classification of updates for which you want to get updates. The acceptable values for this parameter are:

  • All
  • Critical
  • Security
  • WSUS

Parameter properties

Type:WsusUpdateClassifications
Default value:None
Accepted values:All, Critical, Security, WSUS
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RevisionNumber

Specifies the revision number of a specific revision of an update. To specify the latest revision, set to zero.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ID
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Status

Specifies the installation status for which to search. An update will be included only if it has at least one computer with the specified status. The acceptable values for this parameter are:

  • Needed
  • FailedOrNeeded
  • InstalledNotApplicableOrNoStatus
  • Failed
  • InstalledNotApplicable
  • NoStatus
  • Any

Parameter properties

Type:WsusUpdateInstallationState
Default value:None
Accepted values:NoStatus, InstalledOrNotApplicable, InstalledOrNotApplicableOrNoStatus, Failed, Needed, FailedOrNeeded, Any
Supports wildcards:False
DontShow:False

Parameter sets

Scoped
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UpdateId

Specifies the update by its GUID. The GUID uniquely identifies the Windows Update package.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ID
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UpdateServer

Specifies the object that contains the WSUS server. This value is obtained by calling the Get-WsusServer cmdlet and passing the resulting IUpdateServer object into this cmdlet.

Parameter properties

Type:IUpdateServer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.UpdateServices.Administration.IUpdateServer

Outputs

Microsoft.UpdateServices.Commands.WsusUpdate