In this Azure tutorial, we will discuss how to fix the error. The term ‘New-AzResourceGroup’ is not recognized as the name of a cmdlet, which comes while trying to create a resource group using PowerShell in Azure.
Table of Contents
The term ‘New-AzResourceGroup’ is not recognized as the name of a cmdlet
Recently, while trying to execute the below line of cmdlet, I got the above error.
PS C:\windows\system32> New-AzResourceGroup -Name myResourceGroup -Location centralUS
The exact error message was
New-AzResourceGroup: The term ‘New-AzResourceGroup’ 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.
At line:1 char:1
- New-AzResourceGroup -Name myResourceGroup -Location centralUS
~~~~~~~- CategoryInfo : ObjectNotFound: (New-AzResourceGroup:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
The term ‘New-AzResourceGroup’ is not recognized as the name of a cmdlet [Solved]
To fix this error, you need to follow the below steps
1. Install the Az module using the below cmdlet.
PS C:\windows\system32> Install-Module -Name Az -AllowClobber
2. Now click on the Yes button from the below popup.

3. Now, you can see the installation of the Az module is in progress.

4. Once the installation is complete, try executing the below cmdlet again to install the Az module.
PS C:\windows\system32> Install-Module -Name Az -AllowClobber
After executing the above code, there is a maximum chance of getting the below error.
New-AzResourceGroup: The ‘New-AzResourceGroup’ command was found in the module ‘Az.Resources’, but the module could not be loaded. For more information, run ‘Import-Module Az.Resources’.

Now, to fix the above error, You can follow my article. The ‘New-AzResourceGroup’ command was found in the module ‘Az.Resources’
You may like the following Azure tutorial:
Conclusion
In this tutorial, we discussed how to fix the error. The term ‘New-AzResourceGroup’ is not recognized as the name of a cmdlet. I hope it helped you to fix your issue.
I am Bijay, a Microsoft MVP (10 times) having more than 17 years of experience in the software industry. During my IT career, I got a chance to share my expertise in SharePoint and Microsoft Azure, like Azure VM, Azure Active Directory, Azure PowerShell, etc. I hope you will learn from these Azure tutorials. Read more
