PowerShell Az module missing from latest Microsoft-hosted Agents???

Copper Contributor


  • Use PowerShell Az module when executing an Azure DevOps Pipeline
  • Avoid installing Az from scratch (takes several minutes)


I want to execute Az module commands from a Pipeline running on a Microsoft-hosted build agent. According to build agent pre-installed software ubuntu-latest and windows-latest images have Az pre-installed.


Running Get-Module -ListAvailable -Name Az on Microsoft-hosted build agents returns nothing, blank, null... The Pipeline is telling me that PowerShell Az module is not available.
Running Import-Module -Name Az throws "The specified module 'Az' was not loaded because no valid module file was found in any module directory".


Test Pipeline Code

  poolName: 'Azure pipelines'
  vmImage: 'windows-latest'
- pwsh: |
    Get-Module -ListAvailable -Name Az
    Import-Module -Name Az
0 Replies