ps1 write to file append code example
Example 1: powershell append to file
Add-Content c:\scripts\test.txt "The End"
Example 2: powershell output to file
ls | Out-File -FilePath c:\PATH\TO\FOLDER\OUTPUT.txt
Add-Content c:\scripts\test.txt "The End"
ls | Out-File -FilePath c:\PATH\TO\FOLDER\OUTPUT.txt