IAutomaticUpdateApprovalRule.ApplyRule Method ()

 

Applies To: Windows Server Update Services

Applies the defined approval rule against the existing updates on the WSUS server. All updates will be approved if they are not already approved and if they are not declined.

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

Syntax

ReadOnlyCollection<UpdateRevisionId> ApplyRule()
ReadOnlyCollection<UpdateRevisionId^>^ ApplyRule()
abstract ApplyRule : unit -> ReadOnlyCollection<UpdateRevisionId>
Function ApplyRule As ReadOnlyCollection(Of UpdateRevisionId)

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<UpdateRevisionId>

A collection of UpdateRevisionId objects that were approved.

Exceptions

Exception

Condition

InvalidOperationException

The approval rule is not enabled or the server is in replica mode.

WsusObjectNotFoundException

The rule could not found in the database.

Remarks

This method will use the approval rules that are saved in the database. If any changes have been made to the approval rule object, the caller should call Save before calling this method.

This operation requires WSUS Administrator privileges.

See Also

IAutomaticUpdateApprovalRule Interface
Microsoft.UpdateServices.Administration Namespace

Return to top