From the course: Learning PowerShell for Windows Server Administration

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Managing output

Managing output

From the course: Learning PowerShell for Windows Server Administration

Start my 1-month free trial

Managing output

- [Instructor] It's been mentioned previously that when objects reach the end of the pipeline, a cmdlet named out-default will determine what to do with any output. The default output is different for different types of expressions. When we type the cmdlet Get-Module the default output is this table of information that gets displayed to the screen. If I ran another cmdlet, lets say for example, the Import-Module and lets go ahead and bring in the Azure Module just for example. When this cmdlet is run we can see that there is no output. These are some examples of defaults that may happen after you run a command but you don't have to use the defaults if they don't fit your needs. You can choose a different out cmdlet if you like. In fact, there are five to choose from. And they can be added to the pipeline to define where you want the output to go. Out-Host is the one used by Get-Command or Get-Module or many others. It will format certain properties of the object to be displayed on the…

Contents