Installing the Azure module

In order to administrate a Microsoft Azure Cloud environment with Powershell the additionally required Azure module must be downloaded from Microsoft and installed on your local (=premise) computer. In this chapter, this easy and straight-forward process is going to be demonstrated on a Windows 8.1 machine.

1. Download

The required sources for the Azure module are available at for free.



2. Installation





3. Start Powershell with the Azure module



If you use your default PowerShell version, there are almost no drawbacks to using the Azure version if the Azure module has been installed correctly. This is because Powershell takes only a fraction of a second to load the Azure module once it is needed for the first time. Of course, the following line could be added to your profile

Import-Module Azure 

#if the module might not be found then use

Import-Module "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1"

even to avoid that fraction of a second delay.

Once the Azure module has been loaded successfully, it is still a good idea to check the new available Azure cmdlets with

Set-StrictMode -Version "2.0"
$AzureCmdlets = (Get-Command -Module Azure *) 
$AzureHelp = Foreach ($AzureCmdlet in $AzureCmdLets){
  Get-Help  $AzureCmdlet.Name | Select Name,Synopsis
$AzureHelp | Out-File -FilePath "C:\temp\AzureHelp.txt"

#possible result

Name                                                       Synopsis                     
----                                                       --------                         
Add-AzureEnvironment                                       Creates an Azure environment            
Confirm-AzureStorSimpleLegacyVolumeContainerStatus         Initiates the commit or rollback ...
Disable-AzureWebsiteApplicationDiagnostic                  Disables the website's application ...  

Before one of these Azure cmdlets can be applied in a script, a connection to a subscription in the Azure Cloud must be established. The two possibilities for establishing a connection will be shown in the following chapter in detail.