I always assumed help was just an alias for the Get-Help cmdlet. After all if you type
|
1 |
PS> help help |
you get the help page for Get-Help.
But there is a difference. Using help seems to pipe the output through more as you get a page by page display, whereas using Get-Help dumps everything at one go. I checked the aliases though but no alias for help could be found either.
Turns out help is a function! The best way to find out what a command is, is to use the Get-Command cmdlet. Like thus:
|
1 2 3 4 5 |
PS> Get-Command help CommandType Name ModuleName ----------- ---- ---------- Function help |
And to view what the function is, pipe the output through format-list (or select and expand the Definition property):
|
1 2 3 4 5 6 7 8 9 10 11 12 |
PS> Get-Command help | fl Definition Definition : <# .FORWARDHELPTARGETNAME Get-Help .FORWARDHELPCATEGORY Cmdlet #> ... #Set the outputencoding to Console::OutputEncoding. More.com doesn't work well with Unicode. $outputEncoding=[System.Console]::OutputEncoding Get-Help @PSBoundParameters | more |
And here you can see the help function actually calls the Get-Help cmdlet and helpfully pipes the output through more for you. Also, the function is set to use the help page for Get-Help which explains the help page anomaly.
