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)

   

# NAME
Write-Output

# SYNOPSIS
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.

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

# DESCRIPTION
The Write-Output cmdlet sends the specified object down the pipeline to the next command. If the command is the last 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 cmdlet. For example, "get-process | write-output" is equivalent to "get-process".

# PARAMETERS
-InputObject <PSObject[]>
Specifies the objects to send down the pipeline. Enter a variable that contains the objects, or type a command or expression that gets the objects.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

# INPUTS
System.Management.Automation.PSObject
You can pipe objects to Write-Output.

# OUTPUTS
System.Management.Automation.PSObject
Write-Output returns the objects that are submitted as input.

# NOTES

# EXAMPLE 1

C:\PS>$p = get-process

c:\PS> write-output $p

c:\PS> $p

# Description
-----------
These commands get objects representing the processes running on the computer and display the objects on the console.

# EXAMPLE 2

C:\PS>write-output "test output" | get-member

# Description
-----------
This command pipes the "test output" string to the Get-Member cmdlet, which displays the members of the String class, demonstrating that the string was passed along the pipeline.

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113427
Write-Debug
Write-Verbose
Write-Error
Write-Progress
Write-Host
Write-Warning
Tee-Object

C:\Windows>powershell get-help Set-PSBreakpoint -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows 10, 8.1, 8, 7, Vista / Windows Server 2016, 2012, 2008
»»»» ColorConsole









... Windows-10




Windows 10 How To

... Windows 10 FAQ
... Windows 10 How To




PowerShell: 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.

HTTP: ... PS_Windows/en/Write-Output.htm
0.203
21498

Can I restart a background service on Windows 11, 10, 8.1, ...?

 /

The user account picture directory / directory under Windows 10/11!

 /

Windows 10 Spring Creators Update Problem (Redstone 4)!

 /

Desktop Hintergrund bei nicht aktiviertem Windows 11 / 10 ändern?

 /

Windows Desktop shortcut for Excel, Outlook, Word 2013 / 365, how to!

 /

Quick access to Windows 11 Defender settings!

 /

Excel, Word and Office in the Start menu?

 /

Portable rules from 2018, Windows 10, 8.1, 7!

 /

Suchen Sie nach einem Photo Resizer, der unter Windows 11, 10, ...funktioniert!

 /

Problem: Students create new desktop icons and swap positions!

 /

Ansicht im Windows 8.1 Startmenü und Apps Metro Screen vergrößern, bzw verkleinern?

 /

Why is the nice 3D game running a bit slow on my Intel HD?

 /