Does anybody know if it is possible to intend a here-string
. Actually I've to write:
$someString = @"
First line
second line
"@
This becomes very ugly if you define a here-string
on a deeper indentation level, because the ending "@
must be the first character on the line. Additionally somebody might "fix" the missing indentation and break the script ...
Is it possible to define a here-string
like:
$someString = @"
First line
second line
"@
Thx
The closing "@
must be at the start of the line.
I agree with you that this can make the script file harder to read, but it is the rule, and there is no way around it as far as I know.
You can find a uservoice entry here, and you should vote for it if you feel this is important to you. It does not look like a priority at the moment, with only 3 votes, but the more votes, the higher the priority for the powershell team to look into it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With