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

NameDescription
System_CAPS_pubpropertyAction

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

System_CAPS_pubpropertyAdministratorName

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

System_CAPS_pubpropertyComputerTargetGroupId

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

System_CAPS_pubpropertyCreationDate

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

System_CAPS_pubpropertyDeadline

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

System_CAPS_pubpropertyId

Gets the GUID of the approval.

System_CAPS_pubpropertyIsOptional

Gets whether this update approval is optional to clients.

System_CAPS_pubpropertyState

Gets the current state of the approval.

System_CAPS_pubpropertyUpdateId

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

NameDescription
System_CAPS_pubmethodDelete()

Removes the approval from the update.

System_CAPS_pubmethodGetComputerTargetGroup()

Gets the target group to which this approval applies.

System_CAPS_pubmethodGetHashCode()

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

System_CAPS_pubmethodGetUpdate()

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
             Debug.WriteLine(Approval.Deadline.ToLongDateString)
          Else
             Debug.WriteLine("None")
          End If
       End If
    Next
End Sub
Return to top

Community Additions

ADD
Show: