Uninstall-package: no match was found for the specified search criteria and module names

In this Azure tutorial, we will discuss how to fix the error. No match was found for the specified search criteria and module names ‘AzTable’. which I got while trying to uninstall the Azure PowerShell AzTable module using PowerShell ISE in Azure.

Uninstall-package: no match was found for the specified search criteria and module names

Recently, I was trying to execute a PowerShell command to uninstall the AzTable module. I was executing the following command to uninstall the Azure PowerShell AzTable module.

PS C:\WINDOWS\system32> UnInstall-Module AzTable -Force
No match was found for the specified search criteria and module names 'AzTable'

The exact error message was as below

PackageManagement\Uninstall-Package: No match was found for the specified search criteria and
module names ‘AzTable’.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2194 char:21

  • $null = PackageManagement\Uninstall-Package @PSBoundParameters
  • ~~~~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (Microsoft.Power…ninstallPackage:UninstallPacka
      ge) [Uninstall-Package], Exception
    • FullyQualifiedErrorId : NoMatchFound,Microsoft.PowerShell.PackageManagement.Cmdlets.Unins
      tallPackage

Solution

To fix this issue, you can follow the steps below.

1. Open the PowerShell ISE or Windows PowerShell in Run as Administrator mode.

Uninstall-Package No match was found for the specified search criteria and
module names 'AzTable'.

2. Now, to ensure that the ‘AzTable’ module is already installed for you, you can check the installed modules’ availability using the below PowerShell cmdlet. You can see that the AzTable module was not present in my case, which is why I got this error. No match was found for the specified search criteria and module names ‘AzTable’.

PS C:\WINDOWS\system32> Get-InstalledModule
uninstall-package: no match was found for the specified search criteria and module names

3. To check that, let’s try to install the ‘AzTable’ module using the below PowerShell cmdlet. You can see that the AzTable module was installed successfully without any issues.

PS C:\WINDOWS\system32> Install-Module -Name AzTable -Force

Or, you can also use the below PowerShell cmdlet.

PS C:\WINDOWS\system32> Install-Module -Name AzTable -RequiredVersion 2.0.2 -Scope CurrentUser -AllowClobber -Force 
uninstall-package : no match was found for the specified search criteria and module names

4. if you rerun the below PowerShell cmdlet, you can see that the AzTable module has been installed successfully.

PS C:\WINDOWS\system32> Get-InstalledModule

You can see the screenshot below

no match was found for the specified search criteria and module name 'powershellget'

Now, if you try executing the below PowerShell cmdlet to uninstall the AzTable module, It will uninstall the AzTable module successfully without any issue.

PS C:\WINDOWS\system32> UnInstall-Module AzTable -Force
Uninstall  AzTable module PowerShell

To ensure that the AzTable module is uninstalled successfully, you can rerun the Get-InstalledModule PowerShell cmdlet. You can see the AzTable module is not present in the installed module list.

no match was found for the specified search criteria and module name 'powershellget'

Wrapping Up

Well, in this article, we discussed how to fix the error. No match was found for the specified search criteria and module names ‘AzTable’ error I got while trying to uninstall the Azure PowerShell AzTable module using PowerShell ISE.

You may also like following the articles below

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!