August 30th, 2012

PowerTip: Display and Write Output

Doctor Scripto
Scripter

Summary: Learn to display output and write it to a text file.

Hey, Scripting Guy! Question I need to display process output at the Windows PowerShell prompt and write that same output to a text file. How can I do this?

Hey, Scripting Guy! Answer Get-process | Tee-Object -FilePath c:\fso\proc.txt

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.