I have a string:
$string = "`nHello`n"
And I want to output the raw string data "`nHello`n"
. Not it formatted like below:
"
Hello
"
How would I go about doing this?
I have a string:
$string = "`nHello`n"
And I want to output the raw string data "`nHello`n"
. Not it formatted like below:
"
Hello
"
How would I go about doing this?
You could just write ``n to replace `n so, in your script, you could write:
$string = "``nblah``n"
Write-Output $string
Output:
`nblah`n
Or if you want a more r"\nblah\n"
python approach you could use single quotes
$string = '`nblah`n'
Write-Output $string
Output:
`nblah`n