How to pipe help content to select-string in PowerShell?
powershell
Solution
In the ISE, the help function emits MamlCommandHelpInfo objects. Internally, the help function pipes the output of Get-Help to the 'more' utility (enables help paging in the console). In the ISE, 'more' is a simply writes to the pipeline whatever it gets.
To work around this, convert the output to strings. This will work in the ISE and in PowerShell console:
help rd | out-string -stream | select-string cmd
Problem
I simply want to find specific part in the help about some command: ``` help rd | select-string -pattern 'cmd' ``` but I get nothing but errors. What is wrong?