How To Manage Microsoft Azure VMs Using PowerShell

This article will show you how to Connect to Microsoft Azure using PowerShell and manage your Azure virtual Machines.

Before you start don’t forget read how Manage Servers With Azure Server Management tools and all the other articles In the series.

First Download Windows Azure PowerShell 1.0 module

Install the package

Note: the cmdlets below are using the new Resource Manager module that allows you to use Resourse Manager In Azure.

Once Done , you can view all Azure GET-AzureRM* cmdlets by typing

get-help get-azurerm* | Out-GridView

To connect to your Azure Account type:


Once you In you will need to Use the Get-AzureRM* cmdlet to view your configuration for example, to view my VM I’ll use:

get-azurermvm -ResourceGroupName ntgroup -name ntnano01

To view all Virtual machines type:

get-azurermvm -ResourceGroupName ntgroup | select name

To check If the VM Is running type:

Get-Azurermvm -Status -ResourceGroupName ntgroup -name ntnano01

In the statuses section you will see running

To Shut down the VM type:

stop-azurermvm -ResourceGroupName ntgroup -Name ntnano01

You can read more about all the available cmdlets at