Powershell

How to use PowerShell Multiple-Line Comments

How to use PowerShell Multiple-Line Comments?

Use Windows PowerShell multiple line comments in your script or from the console. It is good for debugging for later using it multiple times reuse in other scripts.

Syntax:

Begin the comment with the <# tag, and end the comment with the #> tag:

<# this is a comment on several different lines #>

 

When we enter # on each line or the “#” and “#>” to surround each code block in a remark block

Now PowerShell Studio 2014 makes comments easier.

  1. To individually comment out each line (#)
  2. select one or more lines and press Ctrl + Q
  3. click Comment (in the Edit section of the Home tab).
Vamshi B

Recent Posts

How to install Firefox browser using Powershell

How to install of FireFox browser using PowerShell Sometimes you would like to install Firefox…

2 years ago

How to install chrome with Powershell?

Quick way to install chrome on windows with Powershell? Launch the Powershell and run below…

2 years ago

How to Fix PowerShell Script Not Digitally Signed Error?

How to Fix PowerShell Script Not Digitally Signed Error? When a script with a .ps1…

2 years ago

Powershell Cheat Sheet for beginners

Powershell Cheat Sheet for beginners PowerShell has become something of an ace in the hole…

2 years ago

Can you use Linux commands in Powershell?

Today we discuss one of a few questions a lot of sysadmins and IT Admins…

2 years ago

Backing Up an SQL Database with PowerShell

Backing Up an SQL Database with PowerShell Before making any changes in the production environment,…

2 years ago

This website uses cookies.