Repository navigation
Any attempt to Show help for the parameter at the cursor (Alt-H) causes exception on Windows PowerShell 5.1 #4960
Description
Activity
- addedNeeds-Triage 🔍It's a new issue that core contributor team needs to triage.It's a new issue that core contributor team needs to triage.
on Oct 6, 2025 Dongbo Wang (@daxian-dbw) It happens also on PowerShell 7.5.3 and 7.6.0-preview.5 but for some cmdlets only, like
Get-ADComputer:PS C:\> Get-ADComputer -ResultPageSize Oops, something went wrong. Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections. Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml Thank you! ### Environment PSReadLine: 2.4.4-beta4 PowerShell: 7.5.3 OS: Microsoft Windows 10.0.26200 BufferWidth: 188 BufferHeight: 53 Last 44 Keys: C : Enter g e t - a d c Tab Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace d c Tab Tab Tab Tab Tab Spacebar - r e Tab Alt+h ### Exception Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference at CallSite.Target(Closure, CallSite, Object) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at Microsoft.PowerShell.PSConsoleReadLine.WriteParameterHelp(Object helpContent) at Microsoft.PowerShell.PSConsoleReadLine.WriteDynamicHelpContent(String commandName, String parameterName, Boolean isFullHelp) at Microsoft.PowerShell.PSConsoleReadLine.DynamicHelpImpl(Boolean isFullHelp) at Microsoft.PowerShell.PSConsoleReadLine.ShowParameterHelp(Nullable`1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.InputLoop() at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)
Kris Borowinski (@kborowinski) I don't have
Get-ADComputeravailable on my machine. Could you please try the changes in #4971? You can get the produced artifact at https://ci.appveyor.com/project/SteveL-MSFT/psreadline/builds/52913950/artifactsIf the exception is gone, please also show me the screenshot of the printed-out help content. Thanks!
Dongbo Wang (@daxian-dbw) It seems that this version fixes the issue:
- PowerShell 5.1
- PowerShell 7.5.3
- PowerShell 7.6.0-preview.5

Kris Borowinski (@kborowinski) Thank you!
But I'm still not sure if the fix actually works. I was assuminghelpContent.typereturns null, and thushelpContent.type.namecaused the null reference issue. But in that case, The printed-out help content should be-ResultPageSize <>without the type nameInt32.string syntax = $"-{helpContent.name} <{helpContent.type.name}>";Could you please try again with the original v2.4.4-beta4 PSReadLine, and see if it still reproduce? (I wonder if you ran
Update-Helpand fixed the help content)Kris Borowinski (@kborowinski) Thank you! I appreciate your help.
Reacted by Kris Borowinski- removedNeeds-Triage 🔍It's a new issue that core contributor team needs to triage.It's a new issue that core contributor team needs to triage.
on Oct 16, 2025


Prerequisites
Exception report
Screenshot
Environment data
Steps to reproduce
Start by entering any valid PS cmdlet, then '-' (dash), 'Tab' for completion, Alt-H
Expected behavior
Get help for the parameter at the cursor.
Actual behavior
The above exception happens