So today I needed to look at some historical events for a VM from roughly 30 days ago.  Unfortunately this VM generates a bit of noise in the vCenter event log, with CPU alarms going orange and returning to green, so the last 1000 events didn’t stretch back far enough.

I looked through my repository of powershell scripts I’ve used in the past, modified from various sources, and found one that was close.  It was originally designed to grab all events from vCenter, just needed some slight modifications to look at a single VM.  I couldn’t find anything else around that specifically looked at just one VM, rather than a particular type of event or vCenter as a whole, so I thought I’d share it with you all.

Sure it’s a bit rough, and could be made more generalised, but it worked for my purposes.  Hopefully it will help you out too.