Is there any better way for calculating VM uptime instead of parsing Get-VIEvent for Reboot, Shutdown, Standby events? I need all VM uptime, not only from the last start.
Unless you have some kind of agent running inside the guest OS, the events are the best place afaik. If you keep your events for a long enough time, you retrieve all start/stop events, and not only derive the last uptime.