Get old events from Vcenter using powerCLI

If there is a reason that you want to retrieve older events from Vcenter than the 1000 that are available, you can use powerCLI in order to get specific date ranges.

After you login in the vCenter using

you can use Get-VIEvent with Start or Finish attributes. Be careful also to use Maxsamples attribute in order to get more than 10 that are returned by default.

For example if I wanted all events that have been captured the weekend I could use something like:

P.S Date is a DateTime and should be used as above

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.