Write an object to the pipeline.
Syntax
Write-Output [-inputObject] Object[] [CommonParameters]
Key
-inputObject Object
The object(s) to send along the pipeline.
A variable, command or expression that gets the objects.
CommonParameters:
-Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable.
Examples
Write a string to the pipeline, which by default will appear on the screen:
PS C:\>$myvar="The quick brown fox"
PS C:\>write-output $myvar
"We attract hearts by the qualities we display; we retain them by the qualities we possess" - Jean Baptiste Antoine Suard
Related Powershell Commands:
Tee-Object - Send input objects to two places
Write-Debug - Write a debug message to the host display
Write-Error - Write an object to the error pipeline.
Write-Host - Display objects through the host user interface
Write-Progress - Display a progress bar
Write-Verbose - Write a string to the host’s verbose display
Write-Warning - Write a warning message