PowerShell Logo Small

Out-Host



This is the built-in help made by Microsoft for the command 'Out-Host', in PowerShell version 2 - as retrieved from Windows version 'Microsoft® Windows Vista™ Ultimate ' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Sends output to the command line.

SYNTAX


Out-Host [-InputObject <psobject>] [-Paging] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Out-Host cmdlet sends output to the Windows PowerShell host for display. The host displays the output at the command line. Because Out-Host i
s the default, you do not need to specify it unless you want to use its parameters to change the display.



<

RELATED LINKS

Online version: http://go.microsoft.com/fwlink/?LinkID=113365
Out-Printer
Out-Null
Out-File
Out-String
Out-Default
Write-Host

REMARKS

<

Examples


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

C:\PS>get-process | out-host -paging



Description
-----------
This command displays the processes on the system one page at a time. It uses the Get-Process command to get the processes on the system. The pip
eline operator (|) sends the results to Out-Host, which displays them at the console. The Paging parameter displays one page of data at a time.

The same command format is used for the Help function that is built into Windows PowerShell. That function gets data from Get-Help and then uses
the Paging parameter of Out-Host to display the data one page at a time by using this command format: get-help $args[0] | out-host -paging).








-------------------------- EXAMPLE 2 --------------------------

C:\PS>$a = get-history

C:\PS>out-host -InputObject $a



Description
-----------
These commands display the session history at the command line. The first command uses the Get-History cmdlet to get the session history, and the
n it stores the history in the $a variable. The second command uses Out-Host to display the content of the $a variable, and it uses the InputObje
ct parameter to specify the variable to Out-Host.