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
targetGroup
Type: Microsoft.UpdateServices.Administration.IComputerTargetGroupTarget group for which you want to get a list of approvals for this update.
approvalAction
Type: Microsoft.UpdateServices.Administration.UpdateApprovalActionGet only approvals that contain the given approval action. To include all approval actions, set to All.
fromApprovalDate
Type: System.DateTimeBegin date that is used to search for approvals in Coordinated Universal Time.
toApprovalDate
Type: System.DateTimeEnd 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
targetGroup cannot be null.
fromApprovalDate cannot be greater than toApprovalDate, or the value of approvalAction is not valid.
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