Does anyone know the best way to execute a script using the vSphere scheduled tasks?
Have a look at Re: How to schedule the powercli script in task scheduler
Be aware that this will not work when you are using a VCSA