You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **Out-Host** cmdlet sends output to the Windows PowerShell host for display.
25
-
The host displays the output at the command line.
26
-
Because **Out-Host** is the default, you do not need to specify it unless you want to use its parameters to change the display.
23
+
The `Out-Host` cmdlet sends output to the PowerShell host for display. The host displays the output
24
+
at the command line. Because `Out-Host` is the default, you do not have to specify it unless you
25
+
want to use its parameters to change the display.
27
26
28
27
## EXAMPLES
29
28
30
-
### Example 1
29
+
### Example 1: Display system processes one page at a time
30
+
31
31
```powershell
32
32
Get-Process | Out-Host -Paging
33
33
```
34
34
35
-
This command displays the processes on the system one page at a time.
36
-
It uses the `Get-Process`cmdlet to get the processes on the system.
37
-
The pipeline operator sends the results to `Out-Host`cmdlet, which displays them at the console.
38
-
The **Paging** parameter displays one page of data at a time.
35
+
This command displays the processes on the system one page at a time. It uses the `Get-Process`
36
+
cmdlet to get the processes on the system. The pipeline operator sends the results to `Out-Host`
37
+
cmdlet, which displays them at the console. The **Paging** parameter displays one page of data at a
38
+
time.
39
39
40
-
### Example 2
40
+
### Example 2: Display session history
41
41
42
-
```
43
-
PS> $a = Get-History
44
-
PS> Out-Host -InputObject $a
42
+
```powershell
43
+
$a = Get-History
44
+
Out-Host -InputObject $a
45
45
```
46
46
47
-
These commands display the session history at the command line.
48
-
The first command uses the Get-History cmdlet to get the session history, and then it stores the history in the $a variable.
49
-
The second command uses **Out-Host** to display the content of the $a variable, and it uses the **InputObject** parameter to specify the variable to **Out-Host**.
47
+
The first command uses the `Get-History` cmdlet to get the session history, and then it stores the
48
+
history in the `$a` variable.
49
+
50
+
The second command uses `Out-Host` to display the content of the `$a` variable, and it uses the **InputObject** parameter to specify the variable to `Out-Host`.
50
51
51
52
## PARAMETERS
52
53
53
54
### -InputObject
54
55
55
-
Specifies the objects that are written to the console.
56
-
Enter a variable that contains the objects, or type a command or expression that gets the objects.
56
+
Specifies the objects that are written to the console. Enter a variable that contains the objects,
57
+
or type a command or expression that gets the objects.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
95
+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
91
98
92
99
## INPUTS
93
100
94
101
### System.Management.Automation.PSObject
95
102
96
-
You can pipe any object to **Out-Host**.
103
+
You can pipe any object to this cmdlet.
97
104
98
105
## OUTPUTS
99
106
100
107
### None
101
108
102
-
**Out-Host** does not generate any output.
103
-
However, the host might display the objects that **Out-Host** sends to it.
109
+
This cmdlet does not generate any output. However, the host might display the objects that
110
+
`Out-Host` sends to it.
104
111
105
112
## NOTES
106
113
107
-
- The cmdlets that contain the Out verb (the Out cmdlets) do not format objects; they just render them and send them to the specified display destination. If you send an unformatted object to an Out cmdlet, the cmdlet sends it to a formatting cmdlet before rendering it.
108
-
- 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 help, see the examples.
109
-
- **Out-Host** sends data, but it does not emit any output objects. If you pipe the output of **Out-Host** to the Get-Member cmdlet, **Get-Member** reports that no objects have been specified.
114
+
The **Paging** parameter is not supported by all PowerShell hosts. For example, when you try to
115
+
use the **Paging** parameter in the PowerShell ISE, you see the following error: `out-lineoutput : The method or operation is not implemented.`
116
+
117
+
The cmdlets that contain the **Out** verb (the `Out-*` cmdlets) do not format objects. They just
118
+
render objects and send them to the specified display destination. If you send an unformatted object
119
+
to an `Out-*` cmdlet, the cmdlet sends it to a formatting cmdlet before rendering it.
120
+
121
+
The `Out-*` cmdlets do not have parameters for names or file paths. To send data to an `Out-*`
122
+
cmdlet, use a pipeline operator (|) to send the output of a PowerShell command to the cmdlet. You
123
+
can also store data in a variable and use the **InputObject** parameter to pass the data to the
124
+
cmdlet.
110
125
111
-
-
126
+
`Out-Host`sends data, but it does not emit any output objects. If you pipe the output of `Out-Host`
127
+
to the `Get-Member` cmdlet, `Get-Member` reports that no objects have been specified.
The **Out-Host** cmdlet sends output to the Windows PowerShell host for display.
24
-
The host displays the output at the command line.
25
-
Because **Out-Host** is the default, you do not need to specify it unless you want to use its parameters to change the display.
22
+
23
+
The `Out-Host` cmdlet sends output to the PowerShell host for display. The host displays the output
24
+
at the command line. Because `Out-Host` is the default, you do not have to specify it unless you
25
+
want to use its parameters to change the display.
26
26
27
27
## EXAMPLES
28
28
29
-
### Example 1
29
+
### Example 1: Display system processes one page at a time
30
+
30
31
```powershell
31
32
Get-Process | Out-Host -Paging
32
33
```
33
34
34
-
This command displays the processes on the system one page at a time.
35
-
It uses the `Get-Process`cmdlet to get the processes on the system.
36
-
The pipeline operator sends the results to `Out-Host`cmdlet, which displays them at the console.
37
-
The **Paging** parameter displays one page of data at a time.
35
+
This command displays the processes on the system one page at a time. It uses the `Get-Process`
36
+
cmdlet to get the processes on the system. The pipeline operator sends the results to `Out-Host`
37
+
cmdlet, which displays them at the console. The **Paging** parameter displays one page of data at a
38
+
time.
38
39
39
-
### Example 2
40
-
```
41
-
PS C:\> $a = Get-History
42
-
PS C:\> Out-Host -InputObject $a
40
+
### Example 2: Display session history
41
+
42
+
```powershell
43
+
$a = Get-History
44
+
Out-Host -InputObject $a
43
45
```
44
46
45
-
These commands display the session history at the command line.
46
-
The first command uses the Get-History cmdlet to get the session history, and then it stores the history in the $a variable.
47
-
The second command uses **Out-Host** to display the content of the $a variable, and it uses the **InputObject** parameter to specify the variable to **Out-Host**.
47
+
The first command uses the `Get-History` cmdlet to get the session history, and then it stores the
48
+
history in the `$a` variable.
49
+
50
+
The second command uses `Out-Host` to display the content of the `$a` variable, and it uses the **InputObject** parameter to specify the variable to `Out-Host`.
48
51
49
52
## PARAMETERS
50
53
51
54
### -InputObject
52
-
Specifies the objects that are written to the console.
53
-
Enter a variable that contains the objects, or type a command or expression that gets the objects.
55
+
56
+
Specifies the objects that are written to the console. Enter a variable that contains the objects,
57
+
or type a command or expression that gets the objects.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
94
+
95
+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
86
98
87
99
## INPUTS
88
100
89
101
### System.Management.Automation.PSObject
90
-
You can pipe any object to **Out-Host**.
102
+
103
+
You can pipe any object to this cmdlet.
91
104
92
105
## OUTPUTS
93
106
94
107
### None
95
-
**Out-Host** does not generate any output.
96
-
However, the host might display the objects that **Out-Host** sends to it.
108
+
109
+
This cmdlet does not generate any output. However, the host might display the objects that
110
+
`Out-Host` sends to it.
97
111
98
112
## NOTES
99
-
* The cmdlets that contain the Out verb (the Out cmdlets) do not format objects; they just render them and send them to the specified display destination. If you send an unformatted object to an Out cmdlet, the cmdlet sends it to a formatting cmdlet before rendering it.
100
-
* 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 help, see the examples.
101
-
* **Out-Host** sends data, but it does not emit any output objects. If you pipe the output of **Out-Host** to the Get-Member cmdlet, **Get-Member** reports that no objects have been specified.
102
113
103
-
*
114
+
The **Paging** parameter is not supported by all PowerShell hosts. For example, when you try to
115
+
use the **Paging** parameter in the PowerShell ISE, you see the following error: `out-lineoutput : The method or operation is not implemented.`
116
+
117
+
The cmdlets that contain the **Out** verb (the `Out-*` cmdlets) do not format objects. They just
118
+
render objects and send them to the specified display destination. If you send an unformatted object
119
+
to an `Out-*` cmdlet, the cmdlet sends it to a formatting cmdlet before rendering it.
120
+
121
+
The `Out-*` cmdlets do not have parameters for names or file paths. To send data to an `Out-*`
122
+
cmdlet, use a pipeline operator (|) to send the output of a PowerShell command to the cmdlet. You
123
+
can also store data in a variable and use the **InputObject** parameter to pass the data to the
124
+
cmdlet.
125
+
126
+
`Out-Host`sends data, but it does not emit any output objects. If you pipe the output of `Out-Host`
127
+
to the `Get-Member` cmdlet, `Get-Member` reports that no objects have been specified.
0 commit comments