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.
donj
October 15, 2014, 4:03am
2
Run
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.
Wow that works great Don,
Thank you very much for the direction on this.