powershell write to text file line by line code example Example: powershell output text file Out-File fileName