The term ‘Uninstall-AzModule’ is not recognized as the name of a cmdlet

In this Azure tutorial, we will discuss how to fix the error The term ‘Uninstall-AzModule’ is not recognized as the name of a cmdlet or Uninstall-AzModule not recognized which I got while trying to uninstall the Azure Az module using PowerShell ISE.

The term ‘Uninstall-AzModule’ is not recognized as the name of a cmdlet

Recently, while trying to uninstall the Azure Az PowerShell module. I got the error “The term ‘Uninstall-AzModule’ is not recognized as the name of a cmdlet” or Uninstall-AzModule not recognized. I was trying to execute the below PowerShell Cmdlet to uninstall the Az module.

Uninstall-AzModule not recognized

PS C:\WINDOWS\system32> Uninstall-AzModule -Name Az

You can see the error as below

The term 'Uninstall-AzModule' is not recognized as the name of a cmdlet

Even I tried running the PowerShell command including the PowerShell version like below, But still I got the same error

PS C:\WINDOWS\system32> Uninstall-AzModule -Name Az -Version 4.5.0
Uninstall-AzModule is not recognized

The exact error message was as below

Uninstall-AzModule : The term ‘Uninstall-AzModule’ 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

  • Uninstall-AzModule -Name Az -Version 4.5.0
  • ~~~~~~
    • CategoryInfo : ObjectNotFound: (Uninstall-AzModule:String) [], Command
      NotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

The term ‘Uninstall-AzModule’ is not recognized as the name of a cmdlet [Solved]

To fix this issue, You need to follow the below steps

Uninstall-AzModule not recognized [Solved]

Open the Windows PowerShell ISE as run as administrator mode.

'Uninstall-AzModule' is not recognized as the name of a cmdlet

Now Run the below PowerShell command to know the current Azure Az module version for you. For me, the Az module version is 4.5.0

PS C:\WINDOWS\system32> Get-InstalledModule -Name Az -AllVersions
Uninstall-AzModule not recognized

Now navigate to the Microsoft Site (https://docs.microsoft.com/en-us/powershell/azure/uninstall-az-ps?view=azps-4.7.0) and run the below complete script once

Uninstall AzModule not recognized 1

Then the next step is to Run again the below PowerShell script with your Az module version again, This time you should able to uninstall it without any issue. You can see the below screenshot for your reference

PS C:\WINDOWS\system32> Uninstall-AzModule -Name Az -Version 4.5.0
Uninstall-AzModule The term 'Uninstall-AzModule' is not recognized

This is how you can able to fix the error The term ‘Uninstall-AzModule’ is not recognized as the name of a cmdlet.

You may also like following the below articles

Wrapping Up

In this Article, we discussed, how to fix the below errors

  • The term ‘Uninstall-AzModule’ is not recognized as the name of a cmdlet
  • ‘Uninstall-AzModule’ is not recognized as the name of a cmdlet
  • Uninstall-AzModule’ is not recognized
  • Uninstall-AzModule is not recognized
  • Uninstall-AzModule not recognized

Hope, you have enjoyed this article and it will help you to fix your issues !!!

Leave a Comment