Author Posts

July 24, 2017 at 10:27 am


Wondering if I could somehow select a specific portion out of a powershell help file. For example, out of get-help about_Preference_Variables I would like to directly take a look at the $ProgressPreference variable part.
Is there a way to "grep" directly that part?

July 24, 2017 at 12:43 pm

Get-Help about_Preference_Variables -Full | Out-String -Stream | Select-String -Pattern "$ProgressPreference"

July 24, 2017 at 1:36 pm

DanT thanks, however, PS (I'm using v5) keeps the whole file contents as the output.

July 25, 2017 at 6:21 am

my bad, its working. However, the -ShowWindow might be more efficient after all for such use.