Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Out-Null

Out-Null

system.management.automation.dll

Synopsis

Deletes output instead of sending it down the pipeline.

Syntax

Out-Null [-InputObject] [<CommonParameters>]

Detailed Description

The Out-Null cmdlet sends output to NULL, in effect, deleting it.

Parameters

-InputObject <PSObject>

Specifies the object that was sent to null (deleted). Enter a variable that contains the objects, or type a command or expression that gets the objects.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

Input Type

System.Management.Automation.PSObject

Return Type

None

Notes

The cmdlets that contain the Out verb (the Out cmdlets) do not have parameters for names or file paths. To send data to an Out cmdlet, use a pipeline operator (|) to send the output of a Windows PowerShell command to the cmdlet. You can also store data in a variable and use the InputObject parameter to pass the data to the cmdlet. For more information, see the examples.

Out-Null does not return any output objects. If you pipe the output of Out-Null to the Get-Member cmdlet, Get-Member reports that no objects have been specified.

Examples

-------------------------- EXAMPLE 1 --------------------------

This command gets the items in the local directory, but then it deletes them instead of passing them through the pipeline or displaying them at the command line. This is useful for deleting output that you do not need.

PS C:\>Get-ChildItem | Out-Null

Online Version
Out-Default
Out-File
Out-Host
Out-Printer
Out-String