Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
370 changes: 178 additions & 192 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Functions.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: The automatic variable that contains the current object in the pipeline object.
Locale: en-US
ms.date: 01/31/2025
ms.date: 04/17/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_psitem?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_PSItem
Expand Down Expand Up @@ -400,7 +400,7 @@ For more examples, see the _Accessing exception information_ section in
[07]: about_Functions_Advanced_Parameters.md#validatescript-validation-attribute
[08]: about_Functions_Advanced.md
[09]: about_Functions.md
[10]: about_Functions.md#filters
[10]: about_Functions.md#filter-syntax
[11]: about_Script_Blocks.md
[12]: about_Script_Blocks.md#using-delay-bind-script-blocks-with-parameters
[13]: about_Switch.md
Expand Down
28 changes: 7 additions & 21 deletions reference/5.1/Microsoft.PowerShell.Core/Out-Default.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 02/07/2023
ms.date: 04/17/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/out-default?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Out-Default
Expand All @@ -20,24 +20,9 @@ Out-Default [-Transcript] [-InputObject <PSObject>] [<CommonParameters>]

## DESCRIPTION

PowerShell automatically adds `Out-Default` to the end of every pipeline. `Out-Default` decides how
to format and output the object stream. If the object stream is a stream of strings, `Out-Default`
pipes these directly to `Out-Host` which calls the appropriate APIs provided by the host. If the
object stream does not contain strings, `Out-Default` inspects the object to determine what to do.
First it looks at the object type and determines whether there is a registered _view_ for this
object type.

PowerShell defines an XML schema and a mechanism (the `Update-FormatData` cmdlet) where anyone can
register views for an object type. You can specify **wide**, **list**, **table**, or **custom**
views for any object type. The views specify which properties to display and how they should be
displayed. If a view is registered, it defines which formatter to use. So if the registered view is
a **table** view, `Out-Default` streams the objects to `Format-Table | Out-Host`. `Format-Table`
transforms the objects into a stream of Formatting records (driven by the data in the view
definition) and `Out-Host` transforms the formatting records into calls on the Host interface.

This cmdlet isn't intended to be used by the end user. Other cmdlets are recommended for controlling
output like [Out-Host](Out-Host.md) or using `Format-*` cmdlets and the [Format.ps1xml](About/about_format.ps1xml.md)
file to control formatting.
PowerShell automatically adds `Out-Default` to the end of every top-level interactive pipeline.
`Out-Default` passes the objects it receives to the PowerShell format system. Then, it writes the
formatted output to the console. This cmdlet isn't intended to be used by the end user.

## EXAMPLES

Expand Down Expand Up @@ -82,7 +67,7 @@ Accept wildcard characters: False

### -Transcript

Determines whether the output should be sent to PowerShell's transcription services.
When you use this parameter, the output is only sent to the PowerShell transcript.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand All @@ -100,7 +85,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand Down
42 changes: 22 additions & 20 deletions reference/5.1/Microsoft.PowerShell.Core/Out-Host.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 12/31/2022
ms.date: 04/17/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/out-host?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Out-Host
Expand All @@ -27,10 +27,9 @@ The `Out-Host` cmdlet sends output to the PowerShell host for display. The host
at the command line. Because `Out-Host` is the default, you don't have to specify it unless you want
to use its parameters.

`Out-Host` is automatically appended to every command that is executed. It passes the output of the
pipeline to the host executing the command. `Out-Host` ignores ANSI escape sequences. The escape
sequences are handled by the host. `Out-Host` passes ANSI escape sequences to the host without
trying to interpret or change them.
`Out-Host` passes the output of the pipeline to the host executing the command. `Out-Host` ignores
ANSI escape sequences. The escape sequences are handled by the host. `Out-Host` passes ANSI escape
sequences to the host without trying to interpret or change them.

## EXAMPLES

Expand Down Expand Up @@ -89,14 +88,14 @@ Accept wildcard characters: False

### -Paging

Indicates that `Out-Host` displays one page of output at a time, and waits for user input before the
remaining pages are displayed. By default, all the output is displayed on a single page. The page
size is determined by the characteristics of the host.
Indicates that `Out-Host` displays one page of output at a time. The page size is determined by the
characteristics of the host.

Press the <kbd>Space</kbd> bar to display the next page of output or the <kbd>Enter</kbd> key to
view the next line of output. Press <kbd>Q</kbd> to quit.
After outputting the first page, the command waits for user input before the remaining pages are
displayed. Press the <kbd>Spacebar</kbd> to display the next page of output or the <kbd>Enter</kbd>
key to view the next line of output. Press <kbd>Q</kbd> to quit.

**Paging** is similar to the **more** command.
Using **Paging** is similar to using the **more** command.

> [!NOTE]
> The **Paging** parameter isn't supported by the PowerShell ISE host.
Expand All @@ -117,7 +116,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand All @@ -137,20 +137,22 @@ Windows PowerShell includes the following aliases for `Out-Host`:

- `oh`

The **Paging** parameter isn't supported by all PowerShell hosts. For example, if you use the
**Paging** parameter in the PowerShell ISE, the following error is displayed:
`out-lineoutput : The method or operation is not implemented.`
Not all PowerShell hosts support the **Paging** parameter. For example, if you use the **Paging**
parameter in the Windows PowerShell ISE, the following error is displayed:

> out-lineoutput : The method or operation is not implemented.

The cmdlets that contain the **Out** verb, `Out-`, don't format objects. They render objects 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.

The `Out-` cmdlets don't have parameters for names or file paths. To send data to an `Out-` cmdlet,
use the pipeline to send a PowerShell command's output to the cmdlet. Or, you can store data in a
variable and use the **InputObject** parameter to pass the data to the cmdlet.
The `Out-` cmdlets don't read input from files. To send data to an `Out-` cmdlet, use the pipeline
to send data to the cmdlet. Or, you can store data in a variable and use the **InputObject**
parameter to pass the data to the cmdlet.

`Out-Host` sends data, but it doesn't produce any output objects. If you pipeline the output of
`Out-Host` to the `Get-Member` cmdlet, `Get-Member` reports that no objects have been specified.
`Out-Host` sends data to the host only. Tt doesn't produce output objects to the pipeline. If you
pipeline the output of `Out-Host` to the `Get-Member` cmdlet, `Get-Member` reports that no objects
have been specified.

## RELATED LINKS

Expand Down
Loading