Prerequisites
Steps to reproduce
Repro steps
- Run
Show-Command in PowerShell 7.4
- Click a command
- Click "Show Details" (show in the screenshot below)

Reason
The GetImportModuleCommand method was removed in the PR #20593 (see https://github.com/PowerShell/PowerShell/pull/20593/files#diff-6049789826a31f0b0d8365b339ae7b8fdd8c977fec824cb44397f744adeba639L499).
However, the Show-Command depends on this method to work for the "Show Details" button.
Expected behavior
No crash, no freezing. The details of the command will be shown.
Actual behavior
The GUI freezes and a NullReferenceException is thrown from `Show-Command` in PowerShell.
Error details
PS:10> Show-Command
Show-Command: Object reference not set to an instance of an object.
Environment data
PS:11> $PSVersionTable
Name Value
---- -----
PSVersion 7.4.7
PSEdition Core
GitCommitId 7.4.7
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Prerequisites
Steps to reproduce
Repro steps
Show-Commandin PowerShell 7.4Reason
The
GetImportModuleCommandmethod was removed in the PR #20593 (see https://github.com/PowerShell/PowerShell/pull/20593/files#diff-6049789826a31f0b0d8365b339ae7b8fdd8c977fec824cb44397f744adeba639L499).However, the
Show-Commanddepends on this method to work for the "Show Details" button.Expected behavior
No crash, no freezing. The details of the command will be shown.Actual behavior
The GUI freezes and a NullReferenceException is thrown from `Show-Command` in PowerShell.Error details
Environment data
Visuals
No response