redirect all streams of the current script Powershell code example Example: powershell output to file ls | Out-File -FilePath c:\PATH\TO\FOLDER\OUTPUT.txt