PowerTip: Add Multiple-line Comments in PowerShell


Summary: Learn how to add multiple-line comments in Windows PowerShell.

Hey, Scripting Guy! Question How can I  use Windows PowerShell to add a comment that will wrap over several lines
           if I do not want to use a hash tag for each line?

Hey, Scripting Guy! Answer Begin the comment with <# and end the comment with #>, for example:

<#

   this is a

   multiple line comment

#>

Comments (3)

  1. Thank you for your article

  2. Vern_Anderson says:

    Thanks I can never remember what side the quotes go on and I have that same issue with here strings

Skip to main content