How to fix incompatible versions between Az.Websites and Az.Accounts

Ernesto 61 Reputation points
2023-07-11T18:38:06.82+00:00

I receive this error

Az.Websites\3.0.1\Az.Websites.psm1 : This module requires Az.Accounts version 2.12.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.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,749 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,195 questions
0 comments No comments
{count} votes

Accepted answer
  1. Luke Murray 11,246 Reputation points MVP
    2023-07-11T20:11:23.7933333+00:00

    Hi, Ernesto

    You could remove old version of modules, using something like, update the modules:

    Update-Module Az -Force
    

    Then remove the older ones: Remove old PowerShell modules versions using PowerShell, and then make sure you are running the latest.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.