Updates from: 03/19/2021 04:14:21
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Core About Pipelines (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/About/about_Pipelines.md
---
-description: Combining commands into pipelines in the PowerShell
-keywords: powershell,cmdlet
+description: Combining commands into pipelines in the PowerShell
Locale: en-US Previously updated : 09/27/2019 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pipelines?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Pipelines
properties for a process object.
Get-Process winlogon | Format-List -Property * ```
+You can also pipe the output of native commands to PowerShell cmdlets. For
+example:
+
+```powershell
+PS> ipconfig.exe | Select-String -Pattern 'IPv4'
+
+ IPv4 Address. . . . . . . . . . . : 172.24.80.1
+ IPv4 Address. . . . . . . . . . . : 192.168.1.45
+ IPv4 Address. . . . . . . . . . . : 100.64.108.37
+```
+
+> [!IMPORTANT]
+> The **Success** and **Error** streams are similar to the stdin and stderr
+> streams of other shells. However, stdin is not connected to the PowerShell
+> pipeline for input. For more information, see
+> [about_Redirection](about_Redirection.md).
+ With a bit of practice, you'll find that combining simple commands into pipelines saves time and typing, and makes your scripting more efficient.
Microsoft.PowerShell.Core About Redirection (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/About/about_Redirection.md
--- description: Explains how to redirect output from PowerShell to text files. Locale: en-US Previously updated : 10/14/2020 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Redirection
Explains how to redirect output from PowerShell to text files.
## Long description By default, PowerShell sends output to the PowerShell host. Usually this is the
-console application. However, you can direct the output to a text file, and you
+console application. However, you can redirect the output to a text file and you
can redirect error output to the regular output stream. You can use the following methods to redirect output:
PowerShell supports redirection of the following output streams.
| 6 | **Information** Stream | PowerShell 5.0 | `Write-Information` | | * | All Streams | PowerShell 3.0 | |
-> [!NOTE]
-> There is also a **Progress** stream in PowerShell, but it does not support
-> redirection.
+There is also a **Progress** stream in PowerShell, but it does not support
+redirection.
+
+> [!IMPORTANT]
+> The **Success** and **Error** streams are similar to the stdin and stderr
+> streams of other shells. However, stdin is not connected to the PowerShell
+> pipeline for input.
### PowerShell redirection operators
formatted correctly. To write to files with a different encoding, use the
### Potential confusion with comparison operators The `>` operator is not to be confused with the
-[Greater-than](about_Comparison_Operators.md#-gt--ge--lt-and--le) comparison operator (often
-denoted as `>` in other programming languages).
+[Greater-than](about_Comparison_Operators.md#-gt--ge--lt-and--le) comparison
+operator (often denoted as `>` in other programming languages).
Depending on the objects being compared, the output using `>` can appear to be correct (because 36 is not greater than 42).
Microsoft.PowerShell.Utility Read Host (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Read-Host.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 03/02/2021 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/read-host?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Read-Host
Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>]
## DESCRIPTION
-The `Read-Host` cmdlet reads a line of input from the console. You can use it to prompt a user for
-input. Because you can save the input as a secure string, you can use this cmdlet to prompt users
-for secure data, such as passwords, as well as shared data.
+The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a
+user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
+users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 8190 characters it can accept as input from a user.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### None
-You cannot pipe input to this cmdlet.
+This cmdlet does not accept input from the PowerShell pipeline.
## OUTPUTS
returns a string.
## NOTES
+This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is
+connected to the keyboard of the host console.
+ ## RELATED LINKS [Clear-Host](../microsoft.powershell.core/clear-host.md)
Microsoft.PowerShell.Core About Pipelines (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/About/about_Pipelines.md
---
-description: Combining commands into pipelines in the PowerShell
-keywords: powershell,cmdlet
+description: Combining commands into pipelines in the PowerShell
Locale: en-US Previously updated : 09/27/2019 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pipelines?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Pipelines
properties for a process object.
Get-Process winlogon | Format-List -Property * ```
+You can also pipe the output of native commands to PowerShell cmdlets. For
+example:
+
+```powershell
+PS> ipconfig.exe | Select-String -Pattern 'IPv4'
+
+ IPv4 Address. . . . . . . . . . . : 172.24.80.1
+ IPv4 Address. . . . . . . . . . . : 192.168.1.45
+ IPv4 Address. . . . . . . . . . . : 100.64.108.37
+```
+
+> [!IMPORTANT]
+> The **Success** and **Error** streams are similar to the stdin and stderr
+> streams of other shells. However, stdin is not connected to the PowerShell
+> pipeline for input. For more information, see
+> [about_Redirection](about_Redirection.md).
+ With a bit of practice, you'll find that combining simple commands into pipelines saves time and typing, and makes your scripting more efficient.
Microsoft.PowerShell.Core About Redirection (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/About/about_Redirection.md
--- description: Explains how to redirect output from PowerShell to text files. Locale: en-US Previously updated : 10/14/2020 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Redirection
Explains how to redirect output from PowerShell to text files.
## Long description By default, PowerShell sends output to the PowerShell host. Usually this is the
-console application. However, you can direct the output to a text file, and you
+console application. However, you can redirect the output to a text file and you
can redirect error output to the regular output stream. You can use the following methods to redirect output:
PowerShell supports redirection of the following output streams.
| 6 | **Information** Stream | PowerShell 5.0 | `Write-Information` | | * | All Streams | PowerShell 3.0 | |
-> [!NOTE]
-> There is also a **Progress** stream in PowerShell, but it does not support
-> redirection.
+There is also a **Progress** stream in PowerShell, but it does not support
+redirection.
+
+> [!IMPORTANT]
+> The **Success** and **Error** streams are similar to the stdin and stderr
+> streams of other shells. However, stdin is not connected to the PowerShell
+> pipeline for input.
### PowerShell redirection operators
formatted correctly. To write to files with a different encoding, use the
### Potential confusion with comparison operators The `>` operator is not to be confused with the
-[Greater-than](about_Comparison_Operators.md#-gt--ge--lt-and--le) comparison operator (often
-denoted as `>` in other programming languages).
+[Greater-than](about_Comparison_Operators.md#-gt--ge--lt-and--le) comparison
+operator (often denoted as `>` in other programming languages).
Depending on the objects being compared, the output using `>` can appear to be correct (because 36 is not greater than 42).
Microsoft.PowerShell.Utility Read Host (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Read-Host.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 03/02/2021 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Read-Host
Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>]
## DESCRIPTION
-The `Read-Host` cmdlet reads a line of input from the console. You can use it to prompt a user for
-input. Because you can save the input as a secure string, you can use this cmdlet to prompt users
-for secure data, such as passwords, as well as shared data.
+The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a
+user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
+users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 1022 characters it can accept as input from a user.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### None
-You cannot pipe input to this cmdlet.
+This cmdlet does not accept input from the PowerShell pipeline.
## OUTPUTS
returns a string.
## NOTES
+This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is
+connected to the keyboard of the host console.
+ ## RELATED LINKS [Clear-Host](../microsoft.powershell.core/clear-host.md)
Microsoft.PowerShell.Core About Pipelines (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Pipelines.md
---
-description: Combining commands into pipelines in the PowerShell
-keywords: powershell,cmdlet
+description: Combining commands into pipelines in the PowerShell
Locale: en-US Previously updated : 09/27/2019 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pipelines?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Pipelines
properties for a process object.
Get-Process winlogon | Format-List -Property * ```
+You can also pipe the output of native commands to PowerShell cmdlets. For
+example:
+
+```powershell
+PS> ipconfig.exe | Select-String -Pattern 'IPv4'
+
+ IPv4 Address. . . . . . . . . . . : 172.24.80.1
+ IPv4 Address. . . . . . . . . . . : 192.168.1.45
+ IPv4 Address. . . . . . . . . . . : 100.64.108.37
+```
+
+> [!IMPORTANT]
+> The **Success** and **Error** streams are similar to the stdin and stderr
+> streams of other shells. However, stdin is not connected to the PowerShell
+> pipeline for input. For more information, see
+> [about_Redirection](about_Redirection.md).
+ With a bit of practice, you'll find that combining simple commands into pipelines saves time and typing, and makes your scripting more efficient.
Get-Process | Where-Object CPU | Where-Object Path
[about_Command_Syntax](about_command_syntax.md) [about_ForEach](about_foreach.md)-
Microsoft.PowerShell.Core About Redirection (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Redirection.md
--- description: Explains how to redirect output from PowerShell to text files. Locale: en-US Previously updated : 10/14/2020 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Redirection
Explains how to redirect output from PowerShell to text files.
## Long description By default, PowerShell sends output to the PowerShell host. Usually this is the
-console application. However, you can direct the output to a text file, and you
+console application. However, you can redirect the output to a text file and you
can redirect error output to the regular output stream. You can use the following methods to redirect output:
PowerShell supports redirection of the following output streams.
| 6 | **Information** Stream | PowerShell 5.0 | `Write-Information` | | * | All Streams | PowerShell 3.0 | |
-> [!NOTE]
-> There is also a **Progress** stream in PowerShell, but it does not support
-> redirection.
+There is also a **Progress** stream in PowerShell, but it does not support
+redirection.
+
+> [!IMPORTANT]
+> The **Success** and **Error** streams are similar to the stdin and stderr
+> streams of other shells. However, stdin is not connected to the PowerShell
+> pipeline for input.
### PowerShell redirection operators
formatted correctly. To write to files with a different encoding, use the
### Potential confusion with comparison operators The `>` operator is not to be confused with the
-[Greater-than](about_Comparison_Operators.md#-gt--ge--lt-and--le) comparison operator (often
-denoted as `>` in other programming languages).
+[Greater-than](about_Comparison_Operators.md#-gt--ge--lt-and--le) comparison
+operator (often denoted as `>` in other programming languages).
Depending on the objects being compared, the output using `>` can appear to be correct (because 36 is not greater than 42).
Microsoft.PowerShell.Utility Read Host (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Read-Host.md
--- external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
-keywords: powershell,cmdlet
Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 03/02/2021 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Read-Host
Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>]
## DESCRIPTION
-The `Read-Host` cmdlet reads a line of input from the console. You can use it to prompt a user for
-input. Because you can save the input as a secure string, you can use this cmdlet to prompt users
-for secure data, such as passwords, as well as shared data.
+The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a
+user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
+users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 1022 characters it can accept as input from a user.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### None
-You cannot pipe input to this cmdlet.
+This cmdlet does not accept input from the PowerShell pipeline.
## OUTPUTS
returns a string.
## NOTES
+This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is
+connected to the keyboard of the host console.
+ ## RELATED LINKS [Clear-Host](../microsoft.powershell.core/clear-host.md)
Microsoft.PowerShell.Core About Pipelines (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Pipelines.md
--- description: Combining commands into pipelines in the PowerShell Locale: en-US Previously updated : 09/27/2019 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pipelines?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Pipelines
properties for a process object.
Get-Process winlogon | Format-List -Property * ```
+You can also pipe the output of native commands to PowerShell cmdlets. For
+example:
+
+```powershell
+PS> ipconfig.exe | Select-String -Pattern 'IPv4'
+
+ IPv4 Address. . . . . . . . . . . : 172.24.80.1
+ IPv4 Address. . . . . . . . . . . : 192.168.1.45
+ IPv4 Address. . . . . . . . . . . : 100.64.108.37
+```
+
+> [!IMPORTANT]
+> The **Success** and **Error** streams are similar to the stdin and stderr
+> streams of other shells. However, stdin is not connected to the PowerShell
+> pipeline for input. For more information, see
+> [about_Redirection](about_Redirection.md).
+ With a bit of practice, you'll find that combining simple commands into pipelines saves time and typing, and makes your scripting more efficient.
Microsoft.PowerShell.Core About Redirection (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Redirection.md
--- description: Explains how to redirect output from PowerShell to text files. Locale: en-US Previously updated : 10/14/2020 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about_Redirection
Explains how to redirect output from PowerShell to text files.
## Long description By default, PowerShell sends output to the PowerShell host. Usually this is the
-console application. However, you can direct the output to a text file, and you
+console application. However, you can redirect the output to a text file and you
can redirect error output to the regular output stream. You can use the following methods to redirect output:
PowerShell supports redirection of the following output streams.
| 6 | **Information** Stream | PowerShell 5.0 | `Write-Information` | | * | All Streams | PowerShell 3.0 | |
-> [!NOTE]
-> There is also a **Progress** stream in PowerShell, but it does not support
-> redirection.
+There is also a **Progress** stream in PowerShell, but it does not support
+redirection.
+
+> [!IMPORTANT]
+> The **Success** and **Error** streams are similar to the stdin and stderr
+> streams of other shells. However, stdin is not connected to the PowerShell
+> pipeline for input.
### PowerShell redirection operators
formatted correctly. To write to files with a different encoding, use the
### Potential confusion with comparison operators The `>` operator is not to be confused with the
-[Greater-than](about_Comparison_Operators.md#-gt--ge--lt-and--le) comparison operator (often
-denoted as `>` in other programming languages).
+[Greater-than](about_Comparison_Operators.md#-gt--ge--lt-and--le) comparison
+operator (often denoted as `>` in other programming languages).
Depending on the objects being compared, the output using `>` can appear to be correct (because 36 is not greater than 42).
Attempting to use the reverse comparison `<` (less than), yields a system error:
```powershell PS> if (36 < 42) { "true" } else { "false" }
-At line:1 char:8
-+ if (36 < 42) { "true" } else { "false" }
-+ ~
-The '<' operator is reserved for future use.
- + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
- + FullyQualifiedErrorId : RedirectionNotSupported
+ParserError:
+Line |
+ 1 | if (36 < 42) { "true" } else { "false" }
+ | ~
+ | The '<' operator is reserved for future use.
``` If numeric comparison is the required operation, `-lt` and `-gt` should be
Microsoft.PowerShell.Utility Read Host (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Read-Host.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 03/02/2021 Last updated : 03/18/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/read-host?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Read-Host
Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>]
## DESCRIPTION
-The `Read-Host` cmdlet reads a line of input from the console. You can use it to prompt a user for
-input. Because you can save the input as a secure string, you can use this cmdlet to prompt users
-for secure data, such as passwords, as well as shared data.
+The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a
+user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
+users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 1022 characters it can accept as input from a user.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### None
-You cannot pipe input to this cmdlet.
+This cmdlet does not accept input from the PowerShell pipeline.
## OUTPUTS
returns a string.
## NOTES
+This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is
+connected to the keyboard of the host console.
+ ## RELATED LINKS [Clear-Host](../microsoft.powershell.core/clear-host.md)