(adding your own) Help topic question

With <# #> I can create a help topic in a blank script (meaning that in an otherwise blank script except for the help content when i type help scriptname.ps1 I get what I expect, the help content) but when I use this in an existing script the help just writes the scriptname as output.

I clearly am looking over something very obvious but thought I try the forums to try to get a quick answer.

I have the following script (see link: replaced servernames and UNC paths with _ but it basically goes for everything that has <# #> and then a few lines of code.


For anyone wondering what the script is. I have a colleague that performs wonderfull stuff business wise but has no idea how to set up a proper database so we are stuck with an Access database with no unique id’s. Luckily for me Powershell has great functionallity and when parsing csv files into one for import in Access we also delete all doubles and perform some extra actions that should have been taken care of by others but aren’t.

If anyone can give me a nudge in the right direction it is greatly appriciated!

I placed your gistfile into a file testhelp.ps1. When I ran the following I got the output that I expected.

get-help .\testhelp.ps1
  1. What version of powershell are you using? I testing on PSVersion 5.1.18362.628 and it came out successfully. I also tested on PSVersion 7.0.0-rc.3 and it came out as expected there as well.
  2. Is your script in the path? If not, did you include the.\?
  3. In gist your file has a .txt extension. Is it that way on your local filesystem, or does it have a proper .ps1 extension?

That rules out a lot of stuff and proves it is correct formatting and that maybe something else (environment wise goes wrong). I’ll look into that. Thank you for your reply.



Regarding the feedback I got I tried to delete some line and now it’s to a point that everthing before the .NOTES is displayed, and evertyhing after .NOTES not. Moved .Notes content to the description but it stays unclear why it does what it does. Yet I have my help and that (plus knowing it is the right syntax I used before) is enough.

The notes section will get displayed only if you go for Full help

Get-Help YourScript -Full

Thnx, I just figured that out myself (always the best way) when I got the rest of the notes to work. It does prove that there’s always an answer within the community and posting a question and the feedback I get to them is very positive so thanks for answering.