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
https://github.com/Azure/azure-powershell To install Azure PowerShell
http://ninocrudele.com/azure-and-powershell-installation-and-quick-fixes 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
Login-AzureRmAccount
Used to login into azure account
Set-AzureRmContext -SubscriptionName ‘mysubscription’ To switch between the subscriptions
https://gallery.technet.microsoft.com/Set-Azure-Resource-Manager-f7509ec4 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 https://git-scm.com
Get-AzureRmVMSize -Location $locName | Select Name Get all tiers available per reagion

LEAVE A REPLY

Please enter your comment!
Please enter your name here