Save the content of a text file on to webpage.

After use $notes = Get-Content D:\Notes.txt, I see that $notes still has multiple-line text in it.

When save it after below, the webpage displays single-line text. I tried add <BR/> but not working. Any idea? Thanks.

$ie.Document.getElementById('work_notes').value = $notes


  • Edited by Ian3 Wednesday, May 20, 2015 8:09 PM
May 20th, 2015 8:08pm

Get-contents return an array with no return characters .value = (Get-content file) -join "`r`n"

Free Windows Admin Tool Kit Click here and download it now
May 20th, 2015 9:25pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics