Share via

Connect-AzAccount : The term 'Connect-AzAccount' is not recognized...

Jason Trompeter 25 Reputation points
2025-05-16T20:53:25.82+00:00

Connect-AzAccount : The term 'Connect-AzAccount' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

How do I get past this? enabled the extension for Azure as described, Azure Resource Manager tools

This question is related to the following Learning Module

Azure | Azure Training

Answer accepted by question author

  1. SANJAY R 85 Reputation points
    2025-05-17T10:31:18.3733333+00:00

    The error "Connect-AzAccount : The term 'Connect-AzAccount' is not recognized" indicates that the Azure PowerShell module is either not installed or not loaded in your current session.

    To resolve this, ensure you have the Az.Accounts module installed. If not, use the command Install-Module -Name Az.Accounts. After installation, import the module using Import-Module Az.Accounts. Then, try running Connect-AzAccount again. If issues persist, try starting a new PowerShell session.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Andreas Baumgarten 131.6K Reputation points MVP Volunteer Moderator
    2025-05-16T21:21:13.77+00:00

    Hi @Jason Trompeter ,

    it looks like the Az PowerShell module isn't installed.

    Based on the linked Learning module in your question:

    Be sure that Azure PowerShell Tools are installed from the Visual Studio Code Extensions

    Please verify the VS Code Extension Azure PowerShell Tools is installed and enabled.


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten


Your answer

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