Поделиться через


IUpdateServer.GetSubscription Method ()

 

Applies To: Windows Server Update Services

Gets a subscription instance that you use to manage the synchronization process.

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

Syntax

ISubscription GetSubscription()
ISubscription^ GetSubscription()
abstract GetSubscription : unit -> ISubscription
Function GetSubscription As ISubscription

Return Value

Type: Microsoft.UpdateServices.Administration.ISubscription

An ISubscription object that you use to manage the synchronization process.

Exceptions

Exception

Condition

WsusObjectNotFoundException

Unable to find the system subscription.

Remarks

You use ISubscription to specify the product updates to synchronize, determine when the synchronization process begins, and determine the synchronization's progress.

Examples

The following is an example in Visual Basic of how to start synchronization using the ISubscription that you get using GetSubscription.

Dim updateServer As IUpdateServer 
updateServer= AdminProxy.GetUpdateServer
Dim serverSubscription As ISubscription
serverSubscription = updateServer.GetSubscription
serverSubscription.StartSynchronization

See Also

IUpdateServer Interface
Microsoft.UpdateServices.Administration Namespace

Return to top