powershell output string to file 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