Share via


ISubscription.GetSynchronizationHistory(DateTime, DateTime)

Retrieves synchronization history that occurred during the specified time period.

public SynchronizationInfoCollection GetSynchronizationHistory(
  DateTime fromDate,
  DateTime toDate
);
Public Function GetSynchronizationHistory( _
  ByVal fromDate As DateTime, _
  ByVal toDate As DateTime _
) As SynchronizationInfoCollection
Implements ISubscription.GetSynchronizationHistory

Parameters

  • fromDate
    Begin date that is used to search for events. Specify the date in Coordinated Universal Time.
  • toDate
    End date that is used to search for events. Specify the date in Coordinated Universal Time.

Return Values

A SynchronizationInfoCollection collection that contains the synchronization history that overlaps the specified time period (the method returns the history if the start or end time falls within the period). The collection is unordered. The collection is empty if no events occurred during the time period.

Exceptions

Exception type Condition
ArgumentOutOfRangeException fromDate cannot be greater than toDate.

Remarks

WSUS uses subscription events to generate synchronization history. The synchronization history is lost when subscription events are removed. Events are removed based on the IUpdateServerConfiguration.ServerEventExpirationTime configuration setting.

To retrieve all synchronization history, call ISubscription.GetSynchronizationHistory().

To retrieve synchronization and subscription events, call ISubscription.GetEventHistory.

Requirements

Server Requires Windows Server 2003 or Windows 2000 Server SP4 and later.
Namespace

Defined in Microsoft.UpdateServices.Administration.

Assembly

Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll).

.NET Framework

Requires .NET Framework 1.1.