we are using your package in Azure DevOps on hosted agents and since the new year deployments do not work any more with this error message:
##[error]This module requires Az.Accounts version 2.10.4.
An earlier version of Az.Accounts is imported in the current PowerShell session.
Please open a new session before importing this module.
This error could indicate that multiple incompatible versions of the Azure PowerShell cmdlets are installed on your system.
Please see https://aka.ms/azps-version-error for troubleshooting information.
I tried using windows-2019 and windows-2022 as agents and creating a Powershell script before the task installing Az or Az-accounts versions or uninstalling them but nothing worked so far. I also did no see a requirement for Az.Accounts 2.10.4 anywhere in the code of this package.
I am still not sure if the issue is more with our setup or with the package itself. Can you let us know what the issue is or how we can avoid it?
Hi Kamil,
we are using your package in Azure DevOps on hosted agents and since the new year deployments do not work any more with this error message:
The pipeline itself is very basic:
I tried using windows-2019 and windows-2022 as agents and creating a Powershell script before the task installing Az or Az-accounts versions or uninstalling them but nothing worked so far. I also did no see a requirement for Az.Accounts 2.10.4 anywhere in the code of this package.
I am still not sure if the issue is more with our setup or with the package itself. Can you let us know what the issue is or how we can avoid it?
Thanks and best regards Benedikt