Assign a policy to enforce a condition for existing/new VMs that should shut-down by 7 PM and on by 10 AM

Venu Sunkara 6 Reputation points

Hi Team,

I would like to add a policy which is related to Virtual Machines that should shut down the all VMs at 7 PM and on by 10 AM Daily on Weekdays.

Thanks in advance.

Venu Sunkara

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
815 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 18,652 Reputation points Microsoft Employee

    You can use Azure automation to start/stop VM during off hours.
    Please refer to this document and let me know if you have any questions.

    2 people found this answer helpful.

  2. Armand Brunelle 491 Reputation points

    Hi @Venu Sunkara

    What are those lazy hours to work :) :) :)

    No but seriously do you mind if i ask why you want to shut them down overnight, i am just curious.

    Thanks :P

  3. Vaibhav Chaudhari 38,671 Reputation points

    I don't see any Azure policy for this requirement. However there is Auto turn off option, but again auto start option is not available.

    Azure Virtual Machine auto-shutdown

    Also there was similar feedback for this requirement where MS suggests to use Automation option.

    Ability to turn ON and OFF virtual machines based on a schedule

  4. Nadeim joo 11 Reputation points

    You need to associate Tags with VM and create an automation process that will look for these tags and their values for shutting down VM's and restarting them again.

    0 comments No comments