get-help search within about_* helpfile

Tagged: ,

This topic contains 3 replies, has 2 voices, and was last updated by  mich.a 3 weeks, 5 days ago.

  • Author
    Posts
  • #75547

    mich.a
    Participant

    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

    DanT
    Participant
    Get-Help about_Preference_Variables -Full | Out-String -Stream | Select-String -Pattern "$ProgressPreference"
    • #75611

      mich.a
      Participant

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

    • #75740

      mich.a
      Participant

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

You must be logged in to reply to this topic.