IUpdate.GetUpdateApprovals Method (IComputerTargetGroup, UpdateApprovalAction, DateTime, DateTime)

 

Applies To: Windows Server Update Services

Gets a collection of approvals for this update based on the given criteria.

Namespace:   Microsoft.UpdateServices.Administration
Assembly:  Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)

Syntax

UpdateApprovalCollection GetUpdateApprovals(
    IComputerTargetGroup targetGroup,
    UpdateApprovalAction approvalAction,
    DateTime fromApprovalDate,
    DateTime toApprovalDate
)
UpdateApprovalCollection^ GetUpdateApprovals(
    IComputerTargetGroup^ targetGroup,
    UpdateApprovalAction approvalAction,
    DateTime fromApprovalDate,
    DateTime toApprovalDate
)
abstract GetUpdateApprovals : 
        targetGroup:IComputerTargetGroup *
        approvalAction:UpdateApprovalAction *
        fromApprovalDate:DateTime *
        toApprovalDate:DateTime -> UpdateApprovalCollection
Function GetUpdateApprovals (
    targetGroup As IComputerTargetGroup,
    approvalAction As UpdateApprovalAction,
    fromApprovalDate As Date,
    toApprovalDate As Date
) As UpdateApprovalCollection

Parameters

  • fromApprovalDate
    Type: System.DateTime

    Begin date that is used to search for approvals in Coordinated Universal Time.

  • toApprovalDate
    Type: System.DateTime

    End date that is used to search for approvals in Coordinated Universal Time.

Return Value

Type: Microsoft.UpdateServices.Administration.UpdateApprovalCollection

An UpdateApprovalCollection collection that contains the list of approvals for this update based on the given criteria. The collection is empty if the approval does not match the criteria.

Exceptions

Exception

Condition

ArgumentNullException

targetGroup cannot be null.

ArgumentOutOfRangeException

fromApprovalDate cannot be greater than toApprovalDate, or the value of approvalAction is not valid.

WsusObjectNotFoundException

The update was not found in the database.

Remarks

To get all approvals for this update, call GetUpdateApprovals.

See Also

GetUpdateApprovals Overload
IUpdate Interface
Microsoft.UpdateServices.Administration Namespace

Return to top