We have a large grouping of VM's that are not always required to be running and would like to find a way to shutdown these particular VM's on a sunday night.
Now anyone know how to find a group of VM's (either via label, project, category etc) and pass a shutdown command. Ideally I would like to do this via PowerShell but I will take anything.
Best answer by devwangler
Created a category in Prism, assigned all the VM's that I want to shutdown to the category.
Then I wrote the script below which queries the category via REST API into a hash table. Then using the Nutanix PS cmdlets, I iterate the hash table and power down the VM's.
It now runs via a scheduled task once a week, powering down all non-essential VM's.