Here-string
suggest changeHere-strings are useful for multiline strings. Compared with other multiline strings, you can include quotes without escaping them with a backtick.
Here-string
A here-string begins with @" and a line break, and ends with "@ on its own line. "@ must be the first characters on that line: no leading spaces or tabs. The closing mark is not recognized if it is indented.
@"
Simple
Multiline string
with "quotes"
"@
Literal here-string
You could also create a literal here-string by using single quotes, when you don’t want any expressions to be expanded just like a normal literal string.
@'
The following line won't be expanded
$(Get-Date)
because this is a literal here-string
'@
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents