Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Write-Output

Write-Output - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Sends the specified objects to the next command in the pipeline. If the command is the last command in the pipeline
, the objects are displayed in the console.

Write-Output [-InputObject] <PSObject[]> [<CommonParameters>]

The Write-Output cmdlet sends the specified object down the pipeline to the next command. If the command is the las
t command in the pipeline, the object is displayed in the console.

Write-Output sends objects down the primary pipeline, also known as the "output stream" or the "success pipeline." 
To send error objects down the error pipeline, use Write-Error.

This cmdlet is typically used in scripts to display strings and other objects on the console. However, because the 
default behavior is to display the objects at the end of a pipeline, it is generally not necessary to use the cmdle
t. For example, "get-process | write-output" is equivalent to "get-process".