get-help search within about_* helpfile

Welcome Forums General PowerShell Q&A get-help search within about_* helpfile

This topic contains 3 replies, has 2 voices, and was last updated by

 
Participant
1 year, 5 months ago.

  • Author
    Posts
  • #75547

    Participant
    Points: 1
    Rank: Member

    hello,

    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?

  • #75605

    Participant
    Points: 2
    Rank: Member
    Get-Help about_Preference_Variables -Full | Out-String -Stream | Select-String -Pattern "$ProgressPreference"
    • #75611

      Participant
      Points: 1
      Rank: Member

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

    • #75740

      Participant
      Points: 1
      Rank: Member

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

The topic ‘get-help search within about_* helpfile’ is closed to new replies.