ls | Out-File -FilePath c:PATHTOFOLDEROUTPUT.txt
Add-Content FilePath TextAdded
Add-Content -Path <path> -Value <value>
command 2>&1 | Tee-Object -FilePath ".filePath"