I have a number of admins over the weekend which will be powering off VMs and applying our VMEncryption storage policy. I am not yet comfortable to create and distribute a script for this, but I want to create a script that will monitor and email the task PercentComplete. However, I cannot obtain the VM name from the get-task objects, I can only get the objectID and cannot seem to translate that easily.
Excerpt from my script:
$Report = get-task | Select-object Name, PercentComplete, objectID