Same like other programming language, the comments in Powershell will not executed. Comments can be added to explain the function of the code and it can ย be placed anywhere and anything between them will be treated as a comment.ย The powershell also supports single line and multi line comments.

Single Line Comments

SYNTAX: #

The comment with the # will handling single line comments.ย In PowerShell single line comments start with a hash symbol and everything to the right of the # will be ignored.

Multi-lineย Comments

Begin the comment with the <# tag, and end the comment with the #> tag for handling multiline.ย Multi-line comments are typically used to add descriptive help at the start of a script.

SYNTAX: <# #>