8,330 questions
Hi Priya,You can try setting up the un-recognized module manually, before running your PS scripts. Following lines of code can be added at the beginning of the script to overcome the issue. It also, uninstalls any AzureRm modules runs by default
- task: PowerShell@2
displayName: 'Update Az.Compute Module'
inputs:
targetType: 'inline'
script: |
Get-PackageProvider -Name NuGet -ForceBootstrap
Install-Module -Name Az.Compute -Verbose -Force -AllowClobber
Uninstall-AzureRm -Verbose