Azure PowerShell SDK

Before running any Azure PowerShell command you need to install the Azure PowerShell SDK on your machine. To check if you already have this installed run the command:

PS C:\> Get-Module -ListAvailable Azure
   Directory: C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement
 
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.1      Azure                               {Disable-
 
AzureServiceProjectRemoteDesktop, Enable-AzureSer...
 
PS C:\>

If the above command returns no data, then you need to install the SDK before proceeding. You can install the SDK in either of two ways, either via PowerShell Gallery or via Web PI.

Option 1 – Using PowerShell Gallery
  1. # Install the Azure Resource Manager modules from PowerShell Gallery
  2. Install-Module AzureRM
  3. Install-AzureRM
  4.  
  5. # Install the Azure Service Management module from PowerShell Gallery
  6. Install-Module Azure
  7.  
  8. # Import AzureRM modules 
  9. Import-AzureRM
  10.  
  11. # Import Azure Service Management module
  12. Import-Module Azure

Option 2 0 – Using Web PI

Download the Web PI from https://www.microsoft.com/web/downloads/platform.aspx. Then navigate to Windows Azure PowerShell and click Install.