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, 2973🔥, 0💬
Popular Posts:
How to write a batch file? I want to print "Hello world!" message on the screen. You can follow this...
How programs are added to the startup application list? There are 3 main ways in which programs are ...
How to add ActiveX controls, like text command button, text box, check box, etc., to Presentation sl...
Where to find tutorials on using Windows 10? I want to learn how to use Windows 10 more efficiently....
What is the scheduled task "\Microsoft\Windows\Sett ingSync\BackgroundUpload Task"on my Windows 8 com...