September 2006
Intermediate to advanced
115 pages
2h 19m
English
To create single-line comments, begin a line with the character #. Windows PowerShell does not support multi-line comments, but it is possible to deactivate larger regions of your script by placing them in a here string:
# This is a regular comment
# Start of the here string
$null = @"
function MyTest
{
"This should not be considered a function"
}
$myVariable = 10;
"@
# End of the here string# This is regular script again
See the section “Strings” to learn more about here strings.
Read now
Unlock full access