Stop all services on Azure

1

I have several services in some Azure Resource Groups, today I have to stop one by one when needed! Is it possible to stop all at once?

    
asked by anonymous 21.08.2017 / 01:33

1 answer

1

No, you do not have this functionality the way you look. This is because it is not every service that has the "Stop" option. The only thing that can be done in a batch is to delete a Resouce Group - which helps a lot.

But you can use Azure bash with CLI to make it pretty simple. Here's an example of how to start, stop, and deallocate VMs.

# example usage
az vm start --ids $(
    az vm list --query "[].id"
        -o tsv | grep "Test"
)

az vm stop --ids $(
    az vm list --query "[].id"
        -o tsv | grep "Test"
)

az vm deallocate --ids $(
    az vm list --query "[].id"
        -o tsv | grep "Test"
)

Source: link

    
21.08.2017 / 09:24