Wriju's BLOG

.NET, Cloud and everything

One Line Command to Shutdown all Running Azure VMs using PowerShell

After a long time, I managed one single line command to shutdown all Azure VMs in one single Subscription.

Get-AzureVM | Where { $_.Status -ne "StoppedDeallocated" } | Stop-AzureVM -Force

Namoskar!!!