send output to file in powershell code example Example: powershell output text file Out-File fileName