Hello,
I am trying to access the MostRecentTask property of the VM object but I am having issues via PowerShell. I've noticed that in the details window of the Virtual Machine Manager Console shows the name field as, "Loading...". Also, when I tried to access the property from PowerShell, it's null. Can anyone tell me why this is? I've tried to run a refresh on the virtual machine but with the same result. Any help would be much appreciated.
The overall goal of my script is to access the time the virtual machine was shut down, then compare that to 3 months out. Based on that information, I then want to send an e-mail notifying the owner of the virtual machine that it will be removed at a specified date unless they still need it.