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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With