다음을 통해 공유


Out-Null

Hides the output instead of sending it down the pipeline or displaying it.

구문

Default (기본값)

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

Description

The Out-Null cmdlet sends its output to NULL, in effect, removing it from the pipeline and preventing the output from being displayed on screen. This only affects the standard output stream. Other output streams, like the Error stream are not affected. Exceptions will be displayed. This makes it easier to test your command for any errors.

예제

Example 1: Delete output

Get-ChildItem | Out-Null

This command gets items in the current ___location/directory, but its output is not passed through the pipeline nor displayed at the command line. This is useful for hiding output that you do not need.

매개 변수

-InputObject

Specifies the object to be sent to NULL (removed from pipeline). Enter a variable that contains the objects, or type a command or expression that gets the objects.

매개 변수 속성

형식:PSObject
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:True
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

입력

PSObject

You can pipe any object to this cmdlet.

출력

None

This cmdlet returns no output.

참고

  • 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.