Show-ConsoleHelp
Shows a command's help: synopsis, highlighted syntax, a parameter table and highlighted examples.
Syntax
Show-ConsoleHelp [-AsString] [-Name] <String> [-NoExamples] [-Width <Int32>] [<CommonParameters>]#All Parameter SetsDescription
Shows a command's help: synopsis, highlighted syntax, a parameter table and highlighted examples.
Reads the help PowerShell has for the command (Get-Help -Full): cmdlet help files, comment-based help of functions and scripts, or the help PowerShell generates when there is none. It shows the name and synopsis, the syntax of each parameter set (parameter names, value types and optional parts told apart), the description, a parameter table (type, required, position, pipeline input, default, description), the examples with highlighted PowerShell code, inputs, outputs, notes and related links. Piped on (| more, | Out-Host -Paging, | Out-File) it writes plain lines, so pagers and files get readable text. About topics are written as they are. Works on Windows PowerShell 5.1 and PowerShell 7.
Examples
EXAMPLE 1
Show-ConsoleHelp Get-ChildItemA cmdlet
EXAMPLE 2
Show-ConsoleHelp Format-ConsoleTable | moreThrough a pager
Parameters
- -AsString SwitchParameter
- Returns the help as one string of plain text instead of drawing it.
- -Name String
- The command (a cmdlet, function, alias or script path), or an about topic.
- -NoExamples SwitchParameter
- Leaves out the examples.
- -Width Int32
- The width in columns (default: the console's width).
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.