PowerTip: Use PowerShell Multiple-Line Comments

PowerTip: Use PowerShell Multiple-Line Comments

  • Comments 10
  • Likes

Summary: Use Windows PowerShell multiple-line comments in your script or from the console.

Hey, Scripting Guy! Question How do you type a multiple-line comment?

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

<#

 this is a comment

            on several

            different

            lines

 #>

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • <#

    this works good, but less convenient then the

    comment/uncomment buttons in my IDE

    #>

  • @Knuckle-Dragger of course. But it is nice to have options :-)

  • Use multi-line comments to insert quick help into modules, functions and scripts.  Teh follwoing can be autoinserted when a new fie is creted or it can be inserted via the menu in your fovorite ISE or IDE

    <#

    #requires -version 2.0

    .SYNOPSIS

    .DESCRIPTION

    .PARAMETER  <Parameter-Name>

    .EXAMPLE

    .INPUTS

    .OUTPUTS

    .NOTES

       Author: <author>

       Created: <mm-dd-yyyy>

    .LINK

    #>

  • this works good, but less convenient then the

    comment/uncomment buttons in my IDE <#
    http://dragseo.blogspot.com/2014/09/anizanalternatif-googleadsense.html

  • Almost all people that is amazing chipping in addition to pitching nearby the eco-friendly tend to be why may be the limited gaming. This limited gaming content offered within Wi-Fi Child Mentor consist of many difficulties with.

    http://www.gamingsegment.com/

  • People appreciate shopping for fantastic, appealing, fascinating and sometimes attractive colognes for on their own and with regard to others. This can be executed conveniently as well as inexpensively from an on-line smell shop.

  • People appreciate shopping for fantastic, appealing, fascinating and sometimes attractive colognes for on their own and with regard to others. This can be executed conveniently as well as inexpensively from an on-line smell shop.

    http://www.shoppingsegment.com/

  • Selecting a Finest Special birthday Surprise is certainly Difficult. inch Purchasing a beneficial wedding ceremony treat could make your beneficiary sense specific, particularly once the item would have been a thing individual, distinctive, or even careful. While choosing a point,

    http://www.giftsegment.com/

  • There are many books out there created for these kinds of people. http://www.dailymotion.com/video/x2j1xmt

  • I have found very useful information over there, thanks for sharing this. Please try to add more informative posts in order to keep us in touch. http://www.parolesdartistes.net/