Retrieving events
The Get-VIEvent
cmdlet can be used to retrieve information about the events on a vCenter Server system. The syntax of the Get-VIEvent
cmdlet is as follows:
Get-VIEvent [[-Entity] <VIObject[]>] [-Start <DateTime>] [-Finish
<DateTime>] [-Username <String>] [-MaxSamples <Int32>] [-Types
<EventCategory[]>] [-Server <VIServer[]>] [<CommonParameters>]
The Get-VIEvent
cmdlet has no required parameters.
If you don't specify a value for the -Start
, -End
, and -MaxSamples
parameters, the default maximum number of objects returned will be 100
. If you want to specify the maximum value possible for the -MaxSamples
parameter, you can use -MaxSamples ([int]::MaxValue)
. This is a .NET notation, and it is the equivalent of 2,147,483,647.
You can specify Error
, Info
, or Warning
as the value of the -Types
parameter in order to retrieve the events of the specified types only. For example, to retrieve a maximum of 50 error events...