Skip to content

Alias expansion isn't shown properly when a Module hasn't yet been imported #27044

@kilasuit

Description

@kilasuit

Prerequisites

Steps to reproduce

  1. Get-Command -Module Microsoft.PowerShell.PSResourceGet
  2. Import-Module Microsoft.PowerShell.PSResourceGet
  3. Get-Command -Module Microsoft.PowerShell.PSResourceGet

Expected behavior

This should show

Get-Command -Module *PSResourceGet

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           cmres -> Compress-PSResource                       1.2.0      Microsoft.PowerShell.PSResourceGet

Actual behavior

Get-Command -Module *PSResourceGet

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           cmres ->                                           1.2.0      Microsoft.PowerShell.PSResourceGet

Error details

Environment data

Name                           Value
----                           -----
PSVersion                      7.6.0-rc.1
PSEdition                      Core
GitCommitId                    7.6.0-rc.1
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productWG-Enginecore PowerShell engine, interpreter, and runtimeWG-NeedsReviewNeeds a review by the labeled Working Group

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions