Stop Windows Azure Virtual Machines on a Schedule

Demonstrates stopping a single Virtual Machine or set of Virtual Machines (using a wildcard pattern) within a Cloud Service. It does this by creating scheduled tasks to stop the Virtual Machine(s) on a schedule at the time specified.

 
 
 
 
 
4.4 Star
(7)
8,715 times
Add to favorites
Windows Azure
10/16/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • great script but it's not clear WHERE do we run this from ?
    2 Posts | Last post May 21, 2015
    • So if we want to shut down a bunch of VMs do we need a VM running in Azure to do this and keep it on ?  Also for the start up scripts I guess this is the only way, keep one management VM running with the start up script.  I have tried different methods but I am looking for the most efficient in terms of on-going admin and implementation.   Many thanks.  I hear you can do this in Azure scheduler too but can not find any useful articles on how.
      
      Regards
      Mitesh
      miteshc.wordpress.com
    • An alternative approach is to use Azure Automation to do this kind of thing. Here's an example that handles both shutdown and startup scheduling: 
      
      https://gallery.technet.microsoft.com/Scheduled-Virtual-Machine-2162ac63
  • Authentication and Scheduling?
    2 Posts | Last post January 17, 2014
    • Must be a stupid question, I saw nowhere where to give the name of your subscription or password anything? Assuming that you need to do that before firing this script.
      
      Once we scheduled one task using this script. Where can we see this scheduled task in Windows and how to modify or delete it ?
      
      Thanks
      Piyush
    • The Windows Task scheduler, one of the administrative tools, will show you the scheduled tasks.