IUpdateApproval Interface


Applies To: Windows Server Update Services

Use this interface to get information about an approval and to remove the approval. To get this interface, call the following methods: Approve; Approve; GetUpdateApproval; Item.

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


public interface IUpdateApproval
public interface class IUpdateApproval
type IUpdateApproval = interface end
Public Interface IUpdateApproval


Name Description
System_CAPS_pubproperty Action

Gets the action that the client performs when applying the update.

System_CAPS_pubproperty AdministratorName

Gets the name of the administrator who approved the update for deployment.

System_CAPS_pubproperty ComputerTargetGroupId

Gets the GUID of the computer target group to which this update approval applies.

System_CAPS_pubproperty CreationDate

Gets the date and time when the administrator approved the update for deployment.

System_CAPS_pubproperty Deadline

Gets the date by when the client will be forced to apply the update.

System_CAPS_pubproperty Id

Gets the GUID of the approval.

System_CAPS_pubproperty IsOptional

Gets whether this update approval is optional to clients.

System_CAPS_pubproperty State

Gets the current state of the approval.

System_CAPS_pubproperty UpdateId

Gets theGUID of the update to which this update approval applies.


Name Description
System_CAPS_pubmethod Delete()

Removes the approval from the update.

System_CAPS_pubmethod GetComputerTargetGroup()

Gets the target group to which this approval applies.

System_CAPS_pubmethod GetHashCode()

Gets the hash code for this update approval, for use in hashing algorithms and data structures such as hash tables.

System_CAPS_pubmethod GetUpdate()

Gets the update to which this approval applies.


The following Visual Basic subroutine iterates through all the IUpdateApproval objects in an UpdateApprovalCollection and writes out the deadline, if any.

Sub GetApprovals(ByVal Approvals As UpdateApprovalCollection)
    For Each Approval As IUpdateApproval In Approvals
       If (Approval.Action = UpdateApprovalAction.Install Or Approval.Action = UpdateApprovalAction.Uninstall) Then
          'is there a deadline?
          If (Approval.Deadline <> DateTime.MaxValue) Then
          End If
       End If
End Sub

See Also

Microsoft.UpdateServices.Administration Namespace

Return to top