IUpdate.GetUpdateApprovals(IComputerTargetGroup, UpdateApprovalAction, DateTime, DateTime)
Retrieves a collection of approvals for this update based on the given criteria.
public UpdateApprovalCollection GetUpdateApprovals(IComputerTargetGrouptargetGroup,
UpdateApprovalActionapprovalAction,
DateTimefromApprovalDate,
DateTimetoApprovalDate);
Public Function GetUpdateApprovals( _
ByVal targetGroup As IComputerTargetGroup, _
ByVal approvalAction As UpdateApprovalAction, _
ByVal fromApprovalDate As DateTime, _
ByVal toApprovalDate As DateTime _
) As UpdateApprovalCollection
Implements IUpdate.GetUpdateApprovals
Parameters
- targetGroup
Target group for which you want to retrieve a list of approvals for this update. - approvalAction
Retrieve only approvals that contain the given approval action. To include all approval actions, set to UpdateApprovalAction.All. - fromApprovalDate
Begin date that is used to search for approvals. Specify the date in Coordinated Universal Time. - toApprovalDate
End date that is used to search for approvals. Specify the date in Coordinated Universal Time.
Return Value
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 type | Condition |
---|---|
System.ArgumentNullException | targetGroup cannot be null. |
System.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 retrieve all approvals for this update, call IUpdate.GetUpdateApprovals().
Requirements
Server | Requires Windows Server 2003 or Windows 2000 Server SP4 and later. |
Namespace | Defined in Microsoft.UpdateServices.Administration. |
Assembly | Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll). |
.NET Framework | Requires .NET Framework 1.1. |