May 30th, 2015

PowerTip: Maintain PowerShell Objects

Doctor Scripto
Scripter

Summary: Maintain Windows PowerShell objects in the pipeline.

Hey, Scripting Guy! Question How can I send output to the Windows PowerShell pipeline without changing the formatting or objects, plus
           insure that the output go to the Windows PowerShell console if there is nothing else in the pipeline?

Hey, Scripting Guy! Answer The Write-Output cmdlet sends output to the pipeline or to the console if it is the last command in the pipeline:

Get-Process | Write-Output

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.

Feedback