Out-Null
SYNOPSIS
Deletes output instead of sending it to the console.
SYNTAX
Out-Null [-inputObject <psobject>] [<CommonParameters>]
DETAILED DESCRIPTION
The Out-Null cmdlet sends output to NULL, in effect, deleting it.
PARAMETERS
-inputObject <psobject>
Specifies the object that sent to null (deleted). Enter a variable that contains the objects or type a command or expression that gets the objects.
Required? |
false |
Position? |
named |
Default value |
|
Accept pipeline input? |
true (ByValue) |
Accept wildcard characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".
NOTES
For more information, type "Get-Help Out-Null -detailed". For technical information, type "Get-Help Out-Null -full".
When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".
The Out cmdlets do not have parameters for names or file paths. To send data to an Out cmdlets, 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 help, see the examples.
Out-Null does not emit any output objects. If you pipe the output of Out-Null to Get-Member, Get-Member reports that no objects have been specified.
EXAMPLE 1
get-childitem | out-null
This command gets the items in the local directory, but then discards them, instead of passing them through the pipeline or displaying them at the command line. This is useful for discarding output that you don't need.
RELATED LINKS