Collections:
Other Resources:
Add Comments in Windows PowerShell Scripts
How to add comments in Windows PowerShell scripts?
✍: FYIcenter.com
There are two primary ways to add comments in Windows PowerShell scripts:
1. Using # in the middle of line - If you use the "#" sign in the middle of a line, everything starts from "#" to the end of line is considered as a comment. For example:
Write-Host "Hello World!" # Can you hear me?
2. Using <# ... #> block - If you use the "#" block in a script file, everything between the starting tag and the ending tag is considered as a comment. For example:
<# The following command will
Test connection with the Microsoft Website
Format the output with 2 properties only
#>
Test-Connection www.microsoft.com -count 1 | format-list Address,ResponseTime
⇒ Assign Object to Variable in Windows PowerShell Scripts
⇐ Running Scripts Disabled in Windows PowerShell
2016-11-02, ∼3961🔥, 0💬
Popular Posts:
Where to find information about what system services are running on Windows Server 2012? I want to k...
What is AccelerometerSt.exe process - Hp Accelerometer System Tray? Process AccelerometerSt.exe is t...
Can I disable Windows service "OracleMTSRecoveryServic e"to speedup my computer? Third party applica...
How to use "query user" to find out who is logged in to my Windows 7 computer? If you allow remote l...
How to remove issch.exe from the startup application list to gain performance and reduce security ri...