< Back

Get-WsusUpdate

Thu Apr 04, 2019 5:42 am

NAME Get-WsusUpdate



SYNOPSIS

Gets the WSUS update object with details about the update.





SYNTAX

Get-WsusUpdate [-Approval {Approved | Unapproved | AnyExceptDeclined | Declined}] [-Classification {All | Critical | Security | WSUS}]

[-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable <System.String>] [-Status {NoStatus |

InstalledOrNotApplicable | InstalledOrNotApplicableOrNoStatus | Failed | Needed | FailedOrNeeded | Any}] [-UpdateServer <IUpdateServer>]

[<CommonParameters>]



Get-WsusUpdate [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable <System.String>]

[-RevisionNumber <Int32>] [-UpdateServer <IUpdateServer>] -UpdateId <Guid> [<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.





PARAMETERS

-Approval [<WsusApprovedState>]

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



-- Unapproved

-- Declined

-- Approved

-- AnyExceptDeclined



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Classification [<WsusUpdateClassifications>]

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



-- All

-- Critical

-- Security

-- WSUS



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-InformationAction [<System.Management.Automation.ActionPreference>]

Specifies how this cmdlet responds to an information event. The acceptable values for this parameter are:



-- Continue

-- Ignore

-- Inquire

-- SilentlyContinue

-- Stop

-- Suspend



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-InformationVariable [<System.String>]

Specifies an information variable.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-RevisionNumber [<Int32>]

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



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Status [<WsusUpdateInstallationState>]

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



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-UpdateId <Guid>

Specifies the update by its GUID. The GUID uniquely identifies the Group Policy Object (GPO).



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-UpdateServer [<IUpdateServer>]

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.



Required? false

Position? named

Default value none

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

Microsoft.UpdateServices.Commands.WsusUpdate









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.







RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=287831

Approve-WsusUpdate

Deny-WsusUpdate

Get-WsusServer