How Do You Use a PowerShell Command to Stop an Azure VM?

Problem scenario
You have a server in Azure you want to turn off. What should you do to stop it?

You need to know the server's name and resource group. You can do this by finding the server in the Azure Portal.

Run this command:

Stop-AzureRmVM -ResourceGroupName $nameOfResourceGroup -Name $nameOfVM

# Replace $nameOfResourceGroup with the name of the Resource Group.  Replace $nameOfVM with the name of the the VM.

Leave a comment

Your email address will not be published. Required fields are marked *