This blog post will cover how to shut down an Azure virtual machine using PowerShell and the Az module.
Azure is Microsoft’s cloud computing platform, and it has quickly become one of the top choices for businesses looking for a reliable IT infrastructure without having to spend too much money on their own hardware. This blog post will provide instructions on how to shut down an Azure Virtual Machine with PowerShell (Az Module).
The Az module is a PowerShell-based Azure resource manager that exposes virtually all Azure services through an easy to use PowerShell command-line interface. This module is perfect for a scriptable deployment of resources and offers a number of advanced features such as the ability to execute scripts on any web server in a particular resource group.
The Az module can be installed by downloading it from the Microsoft site, or with the following command:
Install-Module -Name Az
To shut down a Microsoft Azure VM, use the following command with the name of the resource group and the name of the VM.
Stop-AzVM -ResourceGroupName avd -Name avdvm3
Leave a Reply