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.
Table of Contents
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 below command to uninstall the Azure PowerShell AzTable module.
PS C:\WINDOWS\system32> UnInstall-Module AzTable -Force
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
- CategoryInfo : ObjectNotFound: (Microsoft.Power…ninstallPackage:UninstallPacka
Uninstall-package: no match was found for the specified search criteria and module names [Solved]
To fix this issue you can follow the below steps.
1. Open the PowerShell ISE or Windows PowerShell as Run as Administrator mode.
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
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
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
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
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.
This is how we can fix the error. No match was found for the specified search criteria and module names ‘AzTable’.
You may also like following the articles below
- No match was found for the specified search criteria and module name ‘Az’
- Could not load file or assembly Microsoft.Extensions.DependencyInjection.Abstractions
- The term ‘Get-AzTableRow’ is not recognized as the name of a cmdlet
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.
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