具有预期的效果:
$toAdd = @"
{
"name": $SomeVar,"value" : "app"
}
"@
但是如果我缩进-tyo在函数中保留一些结构可以说: 注意“ linex”只是为了说明缩进
line1: $toAdd = @"
line2: {
line3: "name": $SomeVar,line4: "value" : "app"
line5: }
line6: "@
然后我得到:White space is not allowed before the string terminator.PowerShell
有什么办法解决吗?