Auto-shutdown a virtual machine

In this tutorial, you learn how to automatically shut down virtual machines (VMs) in Azure. The auto-shutdown feature for Azure VMs can help reduce costs by shutting down the VMs during off hours when they aren't needed and automatically restarting them when they're needed again.

Configure auto-shutdown for a virtual machine

Sign in to the Azure portal.

  1. In the Azure portal, navigate to the virtual machine you want to configure auto-shutdown for.
  2. In the virtual machine's detail page, select "Auto-shutdown" under the Operations section.
  3. In the "Auto-shutdown" configuration screen, toggle the switch to "On."
  4. Set the time you want the virtual machine to shut down.
  5. Select "Save" to save the auto-shutdown configuration.

Clean up resources

If you no longer need the virtual machine, delete it with the following steps:

  1. Navigate to the virtual machine's Overview page on the left
  2. Select on "Delete" from the top middle option.
  3. Follow the prompts to delete the virtual machine.

For more information on how to delete a virtual machine, see delete a VM.

Next steps

Learn about sizes and how to resize a VM: