次の方法で共有


ISubscription.StartSynchronization Method ()

 

Applies To: Windows Server Update Services

Starts the WSUS server synchronization process.

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

Syntax

void StartSynchronization()
void StartSynchronization()
abstract StartSynchronization : unit -> unit
Sub StartSynchronization

Exceptions

Exception

Condition

InvalidOperationException

The synchronization cannot be started either because of its current state or because WSUS is currently saving server configuration changes.

Remarks

Use this method to start the synchronization agent manually (the agent runs in a separate process). To schedule synchronization to occur every day at a specific time, call SynchronizeAutomatically and SynchronizeAutomaticallyTimeOfDay.

Note that it can take a long time to synchronize the updates. The amount of time depends on the number of categories and classifications to synchronize, the time since you last synchronized, and the available network bandwidth.

To determine if the WSUS server is currently saving the server configuration changes, call GetUpdateServerConfigurationState. If the call returns ProcessingSave then the server is in the process of saving the server configuration.

WSUS synchronizes only new updates (or the latest new revision of an update) that were published since the last time you synchronized the updates.

If the subscription is in the NotProcessing state, this call will start the subscription. If the subscription is already in the Running state, this call will do nothing. If the subscription is in the Stopping state, or the server is processing a configuration save, it will throw an exception. This will also retry the download for all updates in the Canceled, Failed, and LicenseAgreementFailed states.

This operation requires WSUS Administrator privileges.

See Also

ISubscription Interface
Microsoft.UpdateServices.Administration Namespace

Return to top