Compartilhar via


IUpdateServer.GetUpdateEventHistory Method (DateTime, DateTime, Guid, WsusEventSource, WsusEventId )

 

Applies To: Windows Server Update Services

Gets events based on the specified criteria.

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

Syntax

UpdateEventCollection GetUpdateEventHistory(
    DateTime fromDate,
    DateTime toDate,
    Guid updateId,
    WsusEventSource eventSource,
    params WsusEventId[] eventIds
)
UpdateEventCollection^ GetUpdateEventHistory(
    DateTime fromDate,
    DateTime toDate,
    Guid updateId,
    WsusEventSource eventSource,
    ... array<WsusEventId>^ eventIds
)
abstract GetUpdateEventHistory : 
        fromDate:DateTime *
        toDate:DateTime *
        updateId:Guid *
        eventSource:WsusEventSource *
        [<ParamArrayAttribute>] eventIds:WsusEventId[] -> UpdateEventCollection
Function GetUpdateEventHistory (
    fromDate As Date,
    toDate As Date,
    updateId As Guid,
    eventSource As WsusEventSource,
    ParamArray eventIds As WsusEventId()
) As UpdateEventCollection

Parameters

  • fromDate
    Type: System.DateTime

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

  • toDate
    Type: System.DateTime

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

  • updateId
    Type: System.Guid

    Identifier of the update whose installation history events you want to get. Events will be returned for all revisions of this update.

  • eventIds
    Type: Microsoft.UpdateServices.Administration.WsusEventId[]

    Array of events to get. You can specify 0 or more identifiers as parameters, or an array. If you specify a null or a value of 0, the method returns all events for the specified source.

Return Value

Type: Microsoft.UpdateServices.Administration.UpdateEventCollection

An UpdateEventCollection collection of events that were raised that match the specified criteria. The collection is empty if no events match the criteria.

Exceptions

Exception

Condition

ArgumentNullException

update cannot be null.

ArgumentOutOfRangeException

fromDate cannot be greater than toDate.

Remarks

The date time range is inclusive of fromDate and toDate.

See Also

GetUpdateEventHistory Overload
IUpdateServer Interface
Microsoft.UpdateServices.Administration Namespace

Return to top