Hi,
is there any cmdlet/any other way, so that I can count the number of days since when a VM is shutdown, via powerCLI.
e.g. to get a list of all the VMs which are powered-off since more than 30 days.
Thanks for any help!!
Regards
Ashish
There is no cmdlet for that, but you can use the Tasks and Events that are kept on vCenter.
To access those you use the Get-VIEvent cmdlet.
You can also have a look at my Get-VIEventPlus function in my Get the vMotion/svMotion history post.
In my HA VM failover tracking post I explain how to find the available eventtypes.
In this case you will want to fetch the VmPoweredOffEvent event