I had to check if Az
or AzureRM
module is installed on some machines.
But I faced one issue where all Az
commands work from PowerShell
but when I execute Get-InstalledModule -name az
it gives the below error:
PackageManagement\Get-Package : No match was found for the specified search criteria and module names At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2216 char:9 + PackageManagement\Get-Package @PSBoundParameters | Microsoft. ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Microsoft.Power...lets.GetPackage:GetPackage) [Get-Pac + FullyQualifiedErrorId : NoMatchFound,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPackage
Need to understand why Get-InstalledModule
command not giving the expected result.