Google News
logo
PowerShell - Interview Questions
How to use comments in PowerShell?
Like other scripting languages, PowerShell also supports single or multi-line comments.
 
Single-Line comments : "Those comments which use the (hash) # symbol at the beginning of each line".
 
Syntax of single-line comment :
<Any Command or statement> # <Any comment>  
Multi-line comments : "Those comments which use the # (hash) symbol at the end of last line and beginning of the first line".
 
Syntax of Multi-line comment :
<# Multiple-line Comment.........................  
....................  
................................................#>  
Statement-1  
Statement-2  
Statement-N  
Advertisement