This is a part of an on-going blog series written by Adam Gordon. Each week, Adam will walk you through a PowerShell command, showing you when and how to use each one. This week, Adam covers Out-Null.
When to use Out-Null?
The Out-Null cmdlet sends its output to NULL, in effect, removing it from the pipeline and preventing the output to be displayed at the screen.
What version of PowerShell am I using for this blog?
Get the PowerShell Version from your machine:
$PSVersionTable
This command shows you the PowerShell version information on your machine.
How to use Out-Null?
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.
Learn last week’s command: Remove-Module.
Need PowerShell training? Check out ITProTV’s PowerShell online IT training courses.