Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Powershell 7 Get-InstalledModule not working #684

Open
@BohrenAn

Description

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

As you can see below, i am using PowerShell 7. Seems that Get-InstalledModule does not work there.
Get-Module does work.

See also: PowerShell/PowerShell#12271

PS C:> get-host

Name : ConsoleHost
Version : 7.2.6
InstanceId : fd07e65c-c9a5-4e9a-b473-661fc858c9a1
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-CH
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace

PS C:> Get-InstalledModule MicrosoftTeams
Get-Package: No match was found for the specified search criteria and module names 'MicrosoftTeams'.

PS C:> Get-Module MicrosoftTeams -ListAvailable

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Script 4.8.0 MicrosoftTeams Core,Desk {Add-TeamChannelUser, Add-TeamUser, Connect-MicrosoftTeams, Disconnect-MicrosoftTeams…}

PS C:> Get-Module PowerShellGet -ListAvailable

Directory: C:\Users\andres.bohren\OneDrive - ISOLUTIONS AG\Documents\PowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Binary 3.0.17 beta17 PowerShellGet Desk {Find-PSResource, Get-PSResource, Get-PSResourceRepository, Install-PSResource…}

Directory: C:\program files\powershell\7\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Binary 3.0.17 beta17 PowerShellGet Desk {Find-PSResource, Get-PSResource, Get-PSResourceRepository, Install-PSResource…}
Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}
Script 1.0.0.1 PowerShellGet Desk {Install-Module, Find-Module, Save-Module, Update-Module…}

PS C:>

Expected behavior

Get-InstalledModule -Name <ModuleName> #Returns Information about installed Module

Actual behavior

Get-InstalledModule -Name <ModuleName>
Returns the Error:
Get-Package: No match was found for the specified search criteria and module names 'MicrosoftTeams'.

Error details

No response

Environment data

PS C:\> $PSVersionTable

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

Version

PowerShellGet 2.2.5

Visuals

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions