In powershell, if I use @ "" @, then if the string contains $var, the $var will be parsed, so I can only use @ ', but to my surprise @ 'won't work properly either
If you just do that, you'll get an error, so that won't work
Microsoft has told me that I can use two single quotes, but after I use two single quotes, the output is still two single quotes, the first single quote is not escaped, what should I do?
This is my powershell version. I'm using Windows 10
I tried using @" but it won't work because the string contains $var. So, I had to use @', Microsoft's bing ai told me I could use """, but it was deceiving me, powershell doesn't have an expression like three double quotes
You can still use a double quoted here string, @" and "@.
All you need to do is escape the dollar sign in $var, with a backtick, as follows.
$a = @"
aaa
`$var = 'I need this'
"@
echo $a