This is a list of the most used and useful PowerShell commands I use in Microsoft Azure, I will keep this guideline updated time to time.

Script Comment To install Azure PowerShell To install Azure PowerShell and some quick fixes
Find-Module -Name AzureRM | install-module -AllowClobber To install the AzureRM module and force all overriding
Update-Help -Force To force an update of the AzureRM modules
$PSVersionTable.PSVersion Check your PowerShell version
Used to login into azure account
Set-AzureRmContext -SubscriptionName ‘mysubscription’ To switch between the subscriptions Changing the availability group in an existing Azure VM is not currently available in the Azure Portal.
Get-ExecutionPolicy Check the script execution policy setting
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm Set the script execution policy setting
git –version Check that git is accessible from PowerShell.
If git is not recognized as the name of a command verify that you have Git installed. If not, install Git from
Get-AzureRmVMSize -Location $locName | Select Name Get all tiers available per reagion


Please enter your comment!
Please enter your name here