Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 230299

New line `n is not working

$
0
0

I'm writing a small file out to a log, and it will hold the names of multiple VMs.  I want to make sure that I put the date with the VM names, and then I want a new line for each VM.  I tried something like this:

 

("$(Get-date -format MM-dd-yy) `r `n" + "$Removed") | Out-File c:\Scripts\test.txt -Append

 

The date shows, and at first I was only using `n for the new line, and then I tried `r and `n, but everything gets put on one line, and then spaced apart, like this:

 

09-12-13   VMname VMname

 

I'm sure I'm missing something simple, but why isn't the new line appearing? 


Viewing all articles
Browse latest Browse all 230299

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>