简体   繁体   中英

In VSO release Powershell task is failing while using 'Azure Pipelines' agent and same task is passing while using 'Hosted MSIT Fortify 2017' agent

Normal VSO release should work with the 'Azure Pipelines' agent. But it is failing in Azure Powershell task saying 'Could not find the modules: 'Az.Accounts'.. While same task is running with the 'Fortify' agent

Tried all possible agents other than 'Fortify'. Didn't work.

I came across a similar error using task Azure Powershell " Could not find the modules: 'Az.Accounts' with Version: '5.1.1' If the module was recently installed, retry after restarting the Azure Pipelines task agent" .

My fix to this error is to use the latest version of azurePowerShellVersion ,

azurePowerShellVersion: 'latestVersion'

For classic view:

select the latest version 4.* of task Azure Powershell

在此处输入图像描述

check latest installed verison for azure powershell version

在此处输入图像描述

If above fix does not work for you. For better troubleshooting, please post the full error message and the detailed settings of Azure Powershell task.

I had the same problem with version 4 of the task. I switched to 3 and it got fixed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM