powershell write output code example
Example 1: powershell print to console
Write-Output "test output"
Example 2: powershell output to file
ls | Out-File -FilePath c:\PATH\TO\FOLDER\OUTPUT.txt
Write-Output "test output"
ls | Out-File -FilePath c:\PATH\TO\FOLDER\OUTPUT.txt