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)
Syntax
public interface IUpdateApproval
public interface class IUpdateApproval
type IUpdateApproval = interface end
Public Interface IUpdateApproval
Properties
Name | Description | |
---|---|---|
Action | Gets the action that the client performs when applying the update. |
|
AdministratorName | Gets the name of the administrator who approved the update for deployment. |
|
ComputerTargetGroupId | Gets the GUID of the computer target group to which this update approval applies. |
|
CreationDate | Gets the date and time when the administrator approved the update for deployment. |
|
Deadline | Gets the date by when the client will be forced to apply the update. |
|
Id | Gets the GUID of the approval. |
|
IsOptional | Gets whether this update approval is optional to clients. |
|
State | Gets the current state of the approval. |
|
UpdateId | Gets theGUID of the update to which this update approval applies. |
Methods
Name | Description | |
---|---|---|
Delete() | Removes the approval from the update. |
|
GetComputerTargetGroup() | Gets the target group to which this approval applies. |
|
GetHashCode() | Gets the hash code for this update approval, for use in hashing algorithms and data structures such as hash tables. |
|
GetUpdate() | Gets the update to which this approval applies. |
Examples
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
See Also
Microsoft.UpdateServices.Administration Namespace
Return to top