Question of possiblity for help section?

Welcome Forums General PowerShell Q&A Question of possiblity for help section?

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

4 years, 4 months ago.

  • Author
  • #19713

    Points: 1
    Rank: Member

    While creating a script today a question wandered through my mind.
    Is it possible to call specific section within help, and or return information?

    For instance

    < # .NOTES
          Created by: me
          Created on: today
          Version: 20141015.1

    Could I

     get-help get-script.notes 

    to return the notes section then if I wanted to focus down to Version I could?

    Just something to throw out there.

    Thank you very much for any input.
    Have a great day.

  • #19714

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero


    Get-Help Get-Service | Get-Member

    You'll see that help is actually stored and parsed as objects, not plain text, and the various sections are accessible as properties. You can't use the syntax you suggested.

    Get-Help Get-Service | Select-Object -ExpandProperty Notes

    Would be more accurate, I think, as a pattern. This doesn't apply to about_ files, which are just plain text.

  • #19715

    Points: 1
    Rank: Member

    Wow that works great Don,
    Thank you very much for the direction on this.

The topic ‘Question of possiblity for help section?’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort