How to redirect the output of a PowerShell to a file during its execution How to redirect the output of a PowerShell to a file during its execution powershell powershell