how to put the output of a powershell script into a file code example Example: powershell output to file ls | Out-File -FilePath c:\PATH\TO\FOLDER\OUTPUT.txt