- This topic has 5 replies, 3 voices, and was last updated 1 month, 4 weeks ago by
April 4, 2020 at 6:42 pm #215406
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!
April 4, 2020 at 6:56 pm #215412ParticipantTopics: 0Replies: 6Points: 84Rank: Member
I placed your gistfile into a file testhelp.ps1. When I ran the following I got the output that I expected.
- 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.
- Is your script in the path? If not, did you include the.\?
- In gist your file has a .txt extension. Is it that way on your local filesystem, or does it have a proper .ps1 extension?
April 4, 2020 at 7:21 pm #215430
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.
April 4, 2020 at 7:42 pm #215442
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.
April 5, 2020 at 7:14 am #215514
April 5, 2020 at 11:22 am #215547
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.
- You must be logged in to reply to this topic.