Out-Host

Send output to the command line.

Syntax
      Out-Host [-paging] [-inputObject psobject] [CommonParameters]
Key
   -paging 
       Display one page of output at a time, and wait for user input before 
       displaying more. By default, all output is displayed on a single page. 
       The page size is determined by the characteristics of the host.

   -inputObject psobject
       The object to be written to file. {may be piped}
       A command, expression or variabale that contains the objects.

   CommonParameters:
       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable.

Examples

Display system processes one page at a time:

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

Display a snapshot of the session history at the command line:

PS C:\>$a = get-history
PS C:\>out-host -InputObject $a

"less is more" - Ludwig Mies van der Rohe

Related:

Out-Default - Send output to default
Out-File - Send command output to a file
Out-Null - Send output to null
Out-Printer - Send the output to a printer
Out-String - Send output to the pipleline as strings
Tee-Object - Send input objects to two places
Clear-Host - Clear the screen
Write-Host
- Display objects through the host user interface
Equivalent bash command: less - Display output one screen at a time



Back to the Top

© Copyright SS64.com 1999-2010
Some rights reserved