Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

Connect-AzAccount is Not Recognized as The Name of a Cmdlet

September 2, 2022
in Blog, Microsoft Azure, Powershell
0
ADVERTISEMENT

Table of Contents

In some cases, when you connect to Microsoft Azure PowerShell using Connect-AzAccount command. You get the following error.

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.

There are two possibility causes in this case.

  1. The Azure PowerShell module isn’t installed in your machine.
  2. The Az module wasn’t successfully installed because AzureRM modules were already installed.
Note Note: Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, Microsoft will retire AzureRM PowerShell modules on 29 February 2024.

Case 1: Install Az PowerShell module

You can install Az module using Windows PowerShell admin.

1. Right click on the Windows Start icon then select Windows PowerShell Admin. In Windows 11, select Windows Terminal Admin instead of PowerShell Admin.

Pw3

2. Copy then paste all commands into PowerShell windows to install Az PowerShell modules.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name Az -AllowClobber -Scope CurrentUser

3. Connect to a Microsoft Azure subscription.

Connect-AzAccount

Account                 SubscriptionName         TenantId                             Environment
-------                 ----------------         --------                             -----------
[email protected] Azure Pass - Sponsorship dc65dd64-6886-40f2-b247-5b10d8fb5a66 AzureCloud
ADVERTISEMENT

Case 2: Az and AzureRM modules were installed

Az modules wasn’t successfully installed because the AzureRM modules were already installed. You can added the parameter -AllowClobber to install Az modules side-by-side with the AzureRM modules.

 Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -AllowClobber

Uninstalling AzureRM with command Uninstall-AzureRM may also be a great solution, because you’re not going to use AzureRM anymore. Microsoft is going to stop supporting it sometimes in February 2024.

Uninstall AzureRM then install Az modules.

Uninstall-AzureRm
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -AllowClobber
ADVERTISEMENT
5/5 - (1 vote)
Previous Post

How to Download and Install Power BI Desktop in Windows 11

Next Post

How to Check Status of Azure VM using Azure PowerShell

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory