When running the following code:
$txt = Get-Content file1.txt
$a = @"
-- file start --
$txt
-- file end --
"@
$a
All new lines are removed from the file's contents, but just running
$txt
prints out the file without stripping the new lines.
Any idea how to get it to work as desired using the here-string?
Thanks!