Skip navigation

Q. How can I add syntax help to my PowerShell scripts or functions?

A. I've seen a number of folks spend a lot of effort adding a -help parameter to their scripts or functions—and there's no need! You can add help simply by creating specially formatted comments, as described in PowerShell's own online help. Run

 help about_comment_based_help

to read about it. The shell parses these specially formatted comments and constructs a Help page that looks exactly like the "real" help that comes with shell cmdlets. Adding this Help page is a great idea. It helps to document your functions and scripts, making it easier for someone else to use them. By integrating the information into the shell's existing Help feature, your scripts and functions will look more like "real" commands, and other users will have an easier time finding the information.


Do you have a Windows PowerShell question? Why not submit it to Don? Post your question at and you might see your answer online! Find more PowerShell FAQs, articles, and other resources at

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.