Skip to content

Get-InstalledModule not working the same in v7.0 as in Windows PowerShell v5.1 #12271

Description

@PaulBendall

Steps to reproduce

PowerShell module Az is already installed on the system and can be confirmed in PS v5.1 using the same cmdlet.

Get-InstalledModule -Name Az

Expected behavior

Get-InstalledModule -Name Az

Version    Name                                Repository           Description
-------    ----                                ----------           -----------
3.7.0      Az                                  PSGallery            Microsoft Azure PowerShell - Cmdlets to manage..

Actual behavior

Get-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9423
Line |
9423 |          PackageManagement\Get-Package @PSBoundParameters | Microsoft. …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No match was found for the specified search criteria and module names 'Az'.

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

The issue reads similarly to another that has been closed #12040

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-PowerShellGetspecific to PowerShellGet moduleIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-DuplicateThe issue is a duplicate.Resolution-ExternalThe issue is caused by external component(s).

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions