PowerShell TTUC (Tips, Trick, and Useful Commands) – Adding Comment using # and <# #>

In all versions of PowerShell you can use # to a text after it a comment.

Example:

# This a PowerShell comment

In PoweShell V2 and above you can <# #> to make a block of lines comments

Example:

<# First link

Second Line – This is a PowerShell Script

#>

http://www.amazon.com/dp/1849687447/?tag=packtpubli-20
Categories: AzureMicrosoftServer

Related Posts

Microsoft

PowerShell – Tips, Tricks and Useful Commands

Tip #4 –   #4                       Tip #3 – Comparison Operators Published date – May12, 2013 -eq   -ne   -gt   -ge   -lt Read more…

Microsoft

PowerShell TTUC #13 – Scheduled Jobs

PowerShell Tips, Tricks and Useful Commands (TTUC) #13 – Scheduled Jobs PowerShell scripts can be run as a scheduled job using using Windows scheduler.  Create a batch file with the following syntax/commands:   Powershell.exe “c:scriptsmytestscript.ps1” Read more…

Microsoft

PowerShell TTUC #15 – File Name with Time Stamp

PoweShell TTUC (Tips, Tricks and Useful Commands) #16 – File Name with Time Stamp File can be created with date / time suffix using the following syntax / commands: New-item -type file -Name (“MyFile_$(Get-Date -f Read more…