how to put output of a powershell command to text file code example Example: powershell output text file Out-File fileName