Resolution for Azure Orchestrator installation failure due to missing Az powerShell module.
Issue Description:
When attempting to run the installation scripts for Azure Orchestrator if the Az PowerShell module is not installed the installation cannot be completed.
Troubleshooting:
Run the following commands in PowerShell to confirm that the Az PowerShell module is not installed.
To check all modules that are installed for PowerShell, run the following command:
- Get-InstalledModule
Resolution:
If the Az PowerShell module is not listed, follow Microsoft's documentation to install the module manually using the .msi package.
Note: The MSI installer on Windows is designed to install Azure PowerShell for PowerShell 5.1 only.
Run the following command to check the version of PowerShell: Get-Host | Select-Object Version
If the PowerShell version is 5.1:
- Go to https://github.com/Azure/azure-powershell/releases.
- Look for the most recent Gallery Module for Azure PowerShell (these are listed chronologically and are typically just a release version with no name like "4.7.0").
- Scroll down to the bottom of the patch notes and click on the arrow next to "Assets" to reveal the MSI options.
- Click on the Az-Cmdlets MSI desired to start the download.
Note: If module autoloading is disabled, manually import the module with Import-Module Az. Because of the way the module is structured, this can take up to a minute.
Read more here: Install Or Update On Windows Using The MSI Package.
Additional Notes:
- Having both AzureRM and Az modules installed at the same time is not supported. Please make sure to uninstall the AzureRM PowerShell module.
- If the Az PowerShell module is listed, run the following command to confirm that the installed version
To check the version of Az, run the following command:
- To update from an older version of Az, run the following command:
- It is possible that older versions of Az installed will prevent you from running the correct version of Az. As a workaround delete the older C:\Modules\as_x.x.x folder version.