- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to deallocate the Azure VM using Azure CLI in PowerShell?
To deallocate the Azure VM using Azure CLI, we need to use the VM deallocation command az vm deallocate and need to provide the name of the VM and the resource group of the VM.
Before running the deallocation command, make sure that you are connected to the proper azure subscription and the azure account.
PS C:\> az vm deallocate -n VMName -g RGName --verbose
Or you can use
PS C:\> az vm deallocate --name VMName --resource-group RGName --verbose
If you are working on the multiple VMs, you can also apply the --no-wait parameter to continue next operation without waiting for the VM to stop.
PS C:\> az vm deallocate -n VmName -g RGName --no-wait --verbose
- Related Articles
- How to start the Azure VM using Azure CLI in PowerShell?
- How to stop the Azure VM using Azure CLI in PowerShell?
- How to restart the Azure VM using Azure CLI in PowerShell?
- How to resize the Azure VM using Azure CLI in PowerShell?
- How to get the Azure VM Size using Azure CLI in PowerShell?
- How to get the Azure VM username using Azure CLI in PowerShell?
- How to list the azure VM extensions using Azure CLI in PowerShell?
- How to retrieve the Azure VM nic name using Azure CLI in PowerShell?
- How to get the available azure VM size using Azure CLI in PowerShell?
- How to open port for the Azure VM using Azure CLI in PowerShell?
- How to get the location of the Azure VM using Azure CLI in PowerShell?
- How to retrieve the OS of the Azure VM using Azure CLI in PowerShell?
- How to get all the available azure VM images using Azure CLI in PowerShell?
- How to list the Azure VMs using Azure CLI in PowerShell?
- How to connect to the Azure subscription using Azure CLI in PowerShell?

Advertisements