I would like to schedule stop/start Azure virtual machines with an Azure automation runbook.
This is what I've done so far. Created new automation runbook from gallery in Azure management portal. Chose 'Stop Windows Azure Virtual Machines on a Schedule' from 'VM Lifecycle Management' (it's this script). Runbook created, went to Author page of this runbook and pressed test. Provided the necessary parameters. Then several errors appeared on the output, starting with this:
1/21/2015 9:15:26 AM, Error: New-ScheduledTaskTrigger : The term 'New-ScheduledTaskTrigger' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At Stop-AzureVMsOnSchedule:41 char:41
Why this cmdlet cannot be found? I tried to upload the ScheduledTasks module in assets menu from my machine (c:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\ScheduledTasks) but it complained about that the format is invalid.
Could you give me a hint why this script is not working or do you know an alternative what to use for scheduling tasks in an automation runbook?