Share via


Is there a way to turn off all resources

Question

Tuesday, April 12, 2016 6:32 AM

I'm wonder if I can turn off all resources for a while I no longer need to save cost. Turning off each resource is possible but this way is time consuming. If any PowerShell can do it is great.

Thuan Soldier
A 23-year-old man loving Microsoft technologies and making crazy ideas on business journey.
SharePoint Vietnam | Blog | Twitter

All replies (1)

Tuesday, April 12, 2016 10:35 AM

Hi Thuan,

The quick and easy way to stop and deallocate all VMs in a subscription with Azure PowerShell is as follows:

Select-AzureSubscription <sub name>
Get-AzureVM | Stop-AzureVM

PaaS services, if you have any, don't work in the same way, you have to delete these to stop occurring costs, we use an automated deployment solution (Jenkins) for dev/test so we can delete and just redeploy when required.

FYI you still pay for the the storage whether the VM is off or on.

Hope this helps!