Wyjście PowerShell do pliku
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"