PowerShell Saída para arquivo
ls | Out-File -FilePath c:\PATH\TO\FOLDER\OUTPUT.txt
Cheerful Caribou
ls | Out-File -FilePath c:\PATH\TO\FOLDER\OUTPUT.txt
command 2>&1 | Tee-Object -FilePath ".\filePath"