 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- 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 stop the Azure VM using Azure CLI in PowerShell?
To stop the azure VM using Azure CLI we can use the az vm stop command. Before running this command make sure that you are connected to the Azure account and the proper Azure subscription.
When we run this command, we need to provide the Azure VM name (-n) and the resource group name (-g).
PS C:\> az vm stop -n Win2k16VM1 -g TESTVMRG --verbose
The above command will stop the Azure VM Win2k16VM1 from the resource group TestVMRG. Alternatively, you can also use the full parameter name as shown below.
PS C:\> az vm stop --name win2k16vm1 --resource-group testvmrg
This command will wait until the Azure VM stops. To stop the Azure VM without waiting for the VM to stop and move the execution to the next step, we can use -- no-wait parameter.
PS C:\> az vm stop --name win2k16vm1 --resource-group testvmrg --no-wait
Advertisements
 