diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 42167e00f5..171819adb0 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -4258,10 +4258,20 @@ param( $PSBoundParameters['Full'] = $true } - #Set the outputencoding to Console::OutputEncoding. More.com doesn't work well with Unicode. + # Set the outputencoding to Console::OutputEncoding. More.com doesn't work well with Unicode. $outputEncoding=[System.Console]::OutputEncoding - Get-Help @PSBoundParameters | more + $help = Get-Help @PSBoundParameters + + # If a list of help is returned, don't pipe to more + if (($help | Select-Object -First 1).PSTypeNames -Contains 'HelpInfoShort') + { + $help + } + else + { + $help | more + } "; }