共用方式為


ISubscription.GetEventHistory Method (DateTime, DateTime)

 

Applies To: Windows Server Update Services

Gets subscription and synchronization events that occurred during the specified time period.

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

Syntax

SubscriptionEventCollection GetEventHistory(
    DateTime fromDate,
    DateTime toDate
)
SubscriptionEventCollection^ GetEventHistory(
    DateTime fromDate,
    DateTime toDate
)
abstract GetEventHistory : 
        fromDate:DateTime *
        toDate:DateTime -> SubscriptionEventCollection
Function GetEventHistory (
    fromDate As Date,
    toDate As Date
) As SubscriptionEventCollection

Parameters

  • fromDate
    Type: System.DateTime

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

  • toDate
    Type: System.DateTime

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

Return Value

Type: Microsoft.UpdateServices.Administration.SubscriptionEventCollection

A SubscriptionEventCollection is a collection containing subscription and synchronization events that occurred between fromDate and toDate (inclusively0. The collection is unordered. The collection is empty if no events occurred during the time period.

Exceptions

Exception

Condition

ArgumentOutOfRangeException

fromDate cannot be greater than toDate.

Remarks

The number of events returned is partially dependent on the length of time the events are retained in the database. For more information, see ServerEventExpirationTime.

To get all subscription and synchronization events, call GetEventHistory.

To get synchronization-specific information, for example, when the start and end time of the synchronization process and a list of any errors that occurred, call GetSynchronizationHistory.

See Also

GetEventHistory Overload
ISubscription Interface
Microsoft.UpdateServices.Administration Namespace

Return to top