Updates from: 08/12/2021 03:29:36
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Utility Import Csv (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Import-Csv.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/23/2019 Last updated : 08/11/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Import-Csv --- # Import-Csv
-## SYNOPSIS
+## Synopsis
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## SYNTAX
+## Syntax
### Delimiter (Default)
Import-Csv [[-Path] <string[]>] -UseCulture [-LiteralPath <string[]>] [-Header <
[-Encoding <string>] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
`Import-Csv` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## EXAMPLES
+## Examples
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## PARAMETERS
+## Parameters
### -Delimiter
-Specifies the delimiter that separates the property values in the CSV file.
-The default is a comma (,).
+Specifies the delimiter that separates the property values in the CSV file. The default is a comma
+(`,`).
-Enter a character, such as a colon (:).
-To specify a semicolon (;) enclose it in single quotation marks.
+Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in single
+quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
+quotation marks.
If you specify a character other than the actual string delimiter in the file, `Import-Csv` cannot create the objects from the CSV strings and will return the CSV strings.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## OUTPUTS
+## Outputs
### Object This cmdlet returns the objects described by the content in the CSV file.
-## NOTES
+## Notes
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
object. The property values are converted to strings by using the **ToString()**
object, so they are represented by the name of the property value. `Export-Csv` does not export the methods of the object.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Import Csv (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Import-Csv.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 1/8/2019 Last updated : 08/11/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Import-Csv --- # Import-Csv
-## SYNOPSIS
+## Synopsis
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## SYNTAX
+## Syntax
### DelimiterPath (Default)
Import-Csv -LiteralPath <String[]> -UseCulture [-Header <String[]>] [-Encoding <
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
Starting with PowerShell 6.0, `Import-Csv` now supports the W3C Extended Log File Format.
-## EXAMPLES
+## Examples
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## PARAMETERS
+## Parameters
### -Delimiter
-Specifies the delimiter that separates the property values in the CSV file.
-The default is a comma (,).
+Specifies the delimiter that separates the property values in the CSV file. The default is a comma
+(`,`).
-Enter a character, such as a colon (:).
-To specify a semicolon (;) enclose it in single quotation marks.
+Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in single
+quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
+quotation marks.
If you specify a character other than the actual string delimiter in the file, `Import-Csv` cannot create the objects from the CSV strings and will return the CSV strings.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## OUTPUTS
+## Outputs
### Object This cmdlet returns the objects described by the content in the CSV file.
-## NOTES
+## Notes
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
comments and ignored unless the comment starts with `#Fields:` and contains deli
column names. In that case, the cmdlet uses those column names. This is the standard format for Windows IIS and other web server logs. For more information, see [Extended Log File Format](https://www.w3.org/TR/WD-logfile.html).
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Import Csv (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Import-Csv.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 08/19/2020 Last updated : 08/11/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Import-Csv --- # Import-Csv
-## SYNOPSIS
+## Synopsis
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## SYNTAX
+## Syntax
### DelimiterPath (Default)
Import-Csv -LiteralPath <String[]> -UseCulture [-Header <String[]>] [-Encoding <
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
Starting with PowerShell 6.0, `Import-Csv` now supports the W3C Extended Log File Format.
-## EXAMPLES
+## Examples
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## PARAMETERS
+## Parameters
### -Delimiter
-Specifies the delimiter that separates the property values in the CSV file.
-The default is a comma (,).
+Specifies the delimiter that separates the property values in the CSV file. The default is a comma
+(`,`).
-Enter a character, such as a colon (:).
-To specify a semicolon (;) enclose it in single quotation marks.
+Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in single
+quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
+quotation marks.
If you specify a character other than the actual string delimiter in the file, `Import-Csv` cannot create the objects from the CSV strings and will return the CSV strings.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## OUTPUTS
+## Outputs
### Object This cmdlet returns the objects described by the content in the CSV file.
-## NOTES
+## Notes
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
comments and ignored unless the comment starts with `#Fields:` and contains deli
column names. In that case, the cmdlet uses those column names. This is the standard format for Windows IIS and other web server logs. For more information, see [Extended Log File Format](https://www.w3.org/TR/WD-logfile.html).
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Core About ANSI Terminals (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md
+---
+description: Describes the features of PowerShell that use ANSI escape sequences and the terminal hosts that support them.
+Locale: en-US
Last updated : 08/04/2021
+schema: 2.0.0
+ Title: about ANSI terminals
+---
+# about_ANSI_Terminals
+
+## Support for ANSI escape sequences
+
+PowerShell has many features that support the use of ANSI escape sequences to
+control the rendering of output in the terminal application that is hosting
+PowerShell.
+
+PowerShell 7.2 added a new automatic variable, `$PSStyle`, and changes to the
+PowerShell engine to support the output of ANSI-decorated text.
+
+## Terminal support
+
+The ANSI features are designed to be compatible with the xterm-based terminals.
+For more information, see [xterm](https://wikipedia.org/wiki/Xterm) in
+Wikipedia.
+
+On Windows 10, the Windows Console Host is xterm compatible. The
+[Windows Terminal](https://www.microsoft.com/p/windows-terminal/9n0dx20hk701)
+application is also xterm compatible.
+
+On macOS, the default terminal application is xterm compatible.
+
+For Linux, each distribution ships with a different terminal application.
+Consult the documentation for your distribution to find a suitable terminal
+application.
+
+## $PSStyle
+
+The variable contains the following properties:
+
+- **Reset** - Turns off all decorations
+- **Blink** - Turns Blink on
+- **BlinkOff** - Turns Blink off
+- **Bold** - Turns Bold on
+- **BoldOff** - Turns Bold off
+- **Hidden** - Turns Hidden on
+- **HiddenOff** - Turns Hidden off
+- **Reverse** - Turns Reverse on
+- **ReverseOff** - Turns Reverse off
+- **Italic** - Turns Italic on
+- **ItalicOff** - Turns Italic off
+- **Underline** - Turns underlining on
+- **UnderlineOff** - Turns underlining off
+- **OutputRendering** - Control when output rendering is used
+- **Background** - Nested object to control background coloring
+- **Foreground** - Nested object to control foreground coloring
+- **Formatting** - Nested object that controls default formatting for output streams
+- **Progress** - Nested object that controls the rendering of progress bars
+- **FileInfo** - (experimental) Nested object to control the coloring of
+ **FileInfo** objects.
+
+The base members return strings of ANSI escape sequences mapped to their names.
+The values are settable to allow customization. For example, you could change
+bold to underlined. The property names makes it easier for you to create
+decorated strings using tab completion:
+
+```powershell
+"$($PSStyle.Background.LightCyan)Power$($PSStyle.Underline)$($PSStyle.Bold)Shell$($PSStyle.Reset)"
+```
+
+The following members control how or when ANSI formatting is used:
+
+- `$PSStyle.OutputRendering` is a
+ `System.Management.Automation.OutputRendering` enum with the values:
+
+ - **Automatic**: This is the default. If the host supports VirtualTerminal,
+ then ANSI is always passed as-is, otherwise plaintext
+ - **ANSI**: ANSI is always passed through as-is
+ - **PlainText**: ANSI escape sequences are always stripped so that it is only
+ plain text
+ - **Host**: This would be the macOS behavior where the ANSI escape
+ sequences are removed in redirected or piped output.
+
+- The `$PSStyle.Background` and `$PSStyle.Foreground` members are strings that
+ contain the ANSI escape sequences for the 16 standard console colors.
+
+ - Black
+ - White
+ - DarkGray
+ - LightGray
+ - Red
+ - LightRed
+ - Magenta
+ - LightMagenta
+ - Blue
+ - LightBlue
+ - Cyan
+ - LightCyan
+ - Green
+ - LightGreen
+ - Yellow
+ - LightYellow
+
+ The values are settable and can contain any number of ANSI escape sequences.
+ There is also an `FromRgb()` method to specify 24-bit color. There are two
+ ways to call the `FromRgb()` method.
+
+ - string FromRgb(byte red, byte green, byte blue)
+ - string FromRgb(int rgb)
+
+ Either of the following examples set the background color the 24-bit color
+ **Beige**.
+
+ ```powershell
+ $PSStyle.Background.FromRgb(245, 245, 220)
+ $PSStyle.Background.FromRgb(0xf5f5dc)
+ ```
+
+- `$PSStyle.Formatting` is a nested object to control default formatting of
+ debug, error, verbose, and warning messages. You can also control attributes
+ like bolding and underlining. It replaces `$Host.PrivateData` as the way to
+ manage colors for formatting rendering. `$Host.PrivateData` continues to
+ exist for backwards compatibility but is not connected to
+ `$PSStyle.Formatting`. `$PSStyle.Formatting` contains the following members:
+
+ - **FormatAccent**
+ - **TableHeader**
+ - **ErrorAccent**
+ - **Error**
+ - **Warning**
+ - **Verbose**
+ - **Debug**
+
+- `$PSStyle.Progress` allows you to control progress view bar rendering.
+
+ - **Style** - An ANSI string setting the rendering style.
+ - **MaxWidth** - Sets the max width of the view. Set to `0` for console
+ width. Defaults to `120`
+ - **View** - An enum with values, `Minimal` and `Classic`. `Classic` is the
+ existing rendering with no changes. `Minimal` is a single line minimal
+ rendering. `Minimal` is the default.
+ - **UseOSCIndicator** - Defaults to `$false`. Set this to `$true` for
+ terminals that support OSC indicators.
+
+ > [!NOTE]
+ > If the host doesn't support Virtual Terminal, `$PSStyle.Progress.View` is
+ > automatically set to `Classic`.
+
+ The following example sets the rendering style to a minimal progress bar.
+
+ ```powershell
+ $PSStyle.Progress.View = 'Minimal'
+ ```
+
+- `$PSStyle.FileInfo` is a nested object to control the coloring of
+ **FileInfo** objects.
+
+ - **Directory** - Built-in member to specify color for directories
+ - **SymbolicLink** - Built-in member to specify color for symbolic links
+ - **Executable** - Built-in member to specify color for executables.
+ - **Extension** - Use this member to define colors for different file
+ extensions. The **Extension** member pre-includes extensions for archive
+ and PowerShell files.
+
+ > [!NOTE]
+ > `$PSStyle.FileInfo` is only available when the `PSAnsiRenderingFileInfo`
+ > experimental feature ia enabled. For more information, see
+ > [about_Experimental_Features](about_Experimental_Features.md) and
+ > [Using experimental features](/powershell/scripting/learn/experimental-features).
+
+## Cmdlets that support ANSI output
+
+- The markdown cmdlets - the
+ [Show-Markdown](xref:Microsoft.PowerShell.Utility.Show-Markdown) cmdlet
+ displays the contents of a file containing markdown text. The output is
+ rendered using ANSI sequences to represent different styles. You can manage
+ the definitions of the styles using the
+ [Get-MarkdownOption](xref:Microsoft.PowerShell.Utility.Get-MarkdownOption)
+ and
+ [Set-MarkdownOption](xref:Microsoft.PowerShell.Utility.Get-MarkdownOption)
+ cmdlets.
+- PSReadLine cmdlets - the PSReadLine module uses ANSI sequences to colorize
+ PowerShell syntax elements on the command line. The colors can be managed
+ using [Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption) and
+ [Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption).
+- `Get-Error` - the [Get-Error](xref:Microsoft.PowerShell.Utility.Get-Error)
+ cmdlet provide a detailed view of an **Error** object, formatted to make it
+ easier to read.
+- `Select-String` - Beginning with PowerShell 7.0,
+ [Select-String](xref:Microsoft.PowerShell.Utility.Select-String) uses ANSI
+ sequences to highlight the matching patterns in the output.
+- `Write-Progress` - ANSI output is managed using `$PSStyle.Progress`, as
+ described above. For more information, see
+ [Write-Progress](xref:Microsoft.PowerShell.Utility.Write-Progress)
+
+## Disabling ANSI output
+
+Support for ANSI escape sequences can be turned off using the **TERM** or
+**NO_COLOR** environment variables.
+
+The following values of `$env:TERM` change the behavior as follows:
+
+- `dumb` - sets `$Host.UI.SupportsVirtualTerminal = $false`
+- `xterm-mono` - sets `$PSStyle.OutputRendering = PlainText`
+- `xtermm` - sets `$PSStyle.OutputRendering = PlainText`
+
+If `$env:NO_COLOR` exists, then `$PSStyle.OutputRendering` is set to
+**PlainText**. For more information about the **NO_COLOR** environment
+variable, see [https://no-color.org/](https://no-color.org/).
+
+## Using `$PSStyle` from C\#
+
+C# developers can access `PSStyle` as a singleton. Usage will look like this:
+
+```csharp
+string output = $"{PSStyle.Instance.Foreground.Red}{PSStyle.Instance.Bold}Hello{PSStyle.Instance.Reset}";
+```
+
+`PSStyle` exists in the System.Management.Automation namespace.
+
+The PowerShell engine includes the following changes:
+
+- The PowerShell formatting system is updated to respect
+ `$PSStyle.OutputRendering`.
+- The `StringDecorated` type is added to handle ANSI escaped strings.
+- The `string IsDecorated` boolean property was added to return **true** when
+ the string contains `ESC` or `C1 CSI` character sequences.
+- The `Length` property of a string returns the length for the text without the
+ ANSI escape sequences.
+- The `StringDecorated Substring(int contentLength)` method returns a substring
+ starting at index 0 up to the content length that is not a part of ANSI
+ escape sequences. This is needed for table formatting to truncate strings and
+ preserve ANSI escape sequences that don't take up printable character space.
+- The `string ToString()` method stays the same and returns the plaintext
+ version of the string.
+- The `string ToString(bool Ansi)` method returns the raw ANSI embedded string
+ if the `Ansi` parameter is **true**. Otherwise, a plaintext version with ANSI
+ escape sequences removed is returned.
+- The `FormatHyperlink(string text, uri link)` method returns a string
+ containing ANSI escape sequences used to decorate hyperlinks. Some terminal
+ hosts, like the
+ [Windows Terminal](https://www.microsoft.com/p/windows-terminal/9n0dx20hk701),
+ support this markup, which makes the rendered text clickable in the terminal.
Microsoft.PowerShell.Core About Automatic Variables (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
non-zero integer.
### $foreach
-Contains the enumerator (not the resulting values) of a [ForEach](about_ForEach.md)
-loop. The `$ForEach` variable exists only while the `ForEach` loop is running;
-it's deleted after the loop is completed.
+Contains the enumerator (not the resulting values) of a
+[ForEach](about_ForEach.md) loop. The `$ForEach` variable exists only while the
+`ForEach` loop is running; it's deleted after the loop is completed.
Enumerators contain properties and methods you can use to retrieve loop values
-and change the current loop iteration. For more information, see [Using Enumerators](#using-enumerators).
+and change the current loop iteration. For more information, see
+[Using Enumerators](#using-enumerators).
### $HOME
Same as `$_`. Contains the current object in the pipeline object. You can use
this variable in commands that perform an action on every object or on selected objects in a pipeline.
+### $PSNativeCommandArgumentPassing
+
+> [!NOTE]
+> `$PSNativeCommandArgumentPassing` is only available when the
+> `PSNativeCommandArgumentPassing` experimental feature ia enabled. For more
+> information, see
+> [about_Experimental_Features](about_Experimental_Features.md) and
+> [Using experimental features](/powershell/scripting/learn/experimental-features).
+
+When this experimental feature is enabled PowerShell uses the `ArgumentList`
+property of the `StartProcessInfo` object rather than our current mechanism of
+reconstructing a string when invoking a native executable.
+
+> [!CAUTION]
+> The new behavior is a **breaking change** from current behavior. This may
+> break scripts and automation that work around the various issues when
+> invoking native applications. Historically, quotes must be escaped and it is
+> not possible to provide empty arguments to a native application.
+
+This feature adds a new automatic variable `$PSNativeCommandArgumentPassing`
+that allows you to select the behavior at runtime. The valid values are
+`Legacy`, `Standard`, and `Windows`. `Legacy` is the historic behavior. The
+default when the experimental feature is enabled is the new `Standard`
+behavior.
+
+When the preference variable is set to `Windows` invocations of the following
+files automatically use the `Legacy` style argument passing.
+
+- `cmd.exe`
+- `cscript.exe`
+- `wscript.exe`
+- ending with `.bat`
+- ending with `.cmd`
+- ending with `.vbs`
+
+If the `$PSNativeArgumentPassing` is set to either `Legacy` or `Standard`, the
+check for these files do not occur. The default behavior is platform specific.
+On Windows platforms, the default setting is `Windows` and non-Windows
+platforms is `Standard`.
+
+New behaviors made available by this change:
+
+- Literal or expandable strings with embedded quotes the quotes are now
+ preserved:
+
+ ```powershell
+ PS > $a = 'a" "b'
+ PS > $PSNativeCommandArgumentPassing = "Legacy"
+ PS > testexe -echoargs $a 'a" "b' a" "b
+ Arg 0 is <a b>
+ Arg 1 is <a b>
+ Arg 2 is <a b>
+ PS > $PSNativeCommandArgumentPassing = "Standard"
+ PS > testexe -echoargs $a 'a" "b' a" "b
+ Arg 0 is <a" "b>
+ Arg 1 is <a" "b>
+ Arg 2 is <a b>
+ ```
+
+- Empty strings as arguments are now preserved:
+
+ ```powershell
+ PS> $PSNativeCommandArgumentPassing = "Legacy"
+ PS> testexe -echoargs '' a b ''
+ Arg 0 is <a>
+ Arg 1 is <b>
+ PS> $PSNativeCommandArgumentPassing = "Standard"
+ PS> testexe -echoargs '' a b ''
+ Arg 0 is <>
+ Arg 1 is <a>
+ Arg 2 is <b>
+ Arg 3 is <>
+ ```
+
+The new behavior does not change invocations that look like this:
+
+```powershell
+PS> $PSNativeCommandArgumentPassing = "Legacy"
+PS> testexe -echoargs -k com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect
+Arg 0 is <-k>
+Arg 1 is <com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect>
+PS> $PSNativeCommandArgumentPassing = "Standard"
+PS> testexe -echoargs -k com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect
+Arg 0 is <-k>
+Arg 1 is <com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect>
+```
+
+Additionally, parameter tracing is now provided so `Trace-Command` provides
+useful information for debugging.
+
+```powershell
+PS> $PSNativeCommandArgumentPassing = "Legacy"
+PS> trace-command -PSHOST -Name ParameterBinding { testexe -echoargs $a 'a" "b' a" "b }
+DEBUG: 2021-02-01 17:19:53.6438 ParameterBinding Information: 0 : BIND NAMED native application line args [/Users/james/src/github/forks/jameswtruher/PowerShell-1/test/tools/TestExe/bin/testexe]
+DEBUG: 2021-02-01 17:19:53.6440 ParameterBinding Information: 0 : BIND argument [-echoargs a" "b a" "b "a b"]
+DEBUG: 2021-02-01 17:19:53.6522 ParameterBinding Information: 0 : CALLING BeginProcessing
+Arg 0 is <a b>
+Arg 1 is <a b>
+Arg 2 is <a b>
+PS> $PSNativeCommandArgumentPassing = "Standard"
+PS> trace-command -PSHOST -Name ParameterBinding { testexe -echoargs $a 'a" "b' a" "b }
+DEBUG: 2021-02-01 17:20:01.9829 ParameterBinding Information: 0 : BIND NAMED native application line args [/Users/james/src/github/forks/jameswtruher/PowerShell-1/test/tools/TestExe/bin/testexe]
+DEBUG: 2021-02-01 17:20:01.9829 ParameterBinding Information: 0 : BIND cmd line arg [-echoargs] to position [0]
+DEBUG: 2021-02-01 17:20:01.9830 ParameterBinding Information: 0 : BIND cmd line arg [a" "b] to position [1]
+DEBUG: 2021-02-01 17:20:01.9830 ParameterBinding Information: 0 : BIND cmd line arg [a" "b] to position [2]
+DEBUG: 2021-02-01 17:20:01.9831 ParameterBinding Information: 0 : BIND cmd line arg [a b] to position [3]
+DEBUG: 2021-02-01 17:20:01.9908 ParameterBinding Information: 0 : CALLING BeginProcessing
+Arg 0 is <a" "b>
+Arg 1 is <a" "b>
+Arg 2 is <a b>
+```
+ ### $PSScriptRoot Contains the full path of the executing script's parent directory.
property, use the **ApplicationArguments** parameter of the
### $PSStyle
-> [!NOTE]
-> This variable is only available when the `PSAnsiRendering` experimental
-> feature ia enabled. For more information, see
-> [about_Experimental_Features](about_Experimental_Features.md) and
-> [Using experimental features](/powershell/scripting/learn/experimental-features).
- As of PowerShell 7.2 you can now access the `$PSStyle` automatic variable to view and change the rendering of ANSI string output. The variable contains the following properties: - **Reset** - Turns off all decorations-- **Background** - Nested object to control background coloring - **Blink** - Turns Blink on - **BlinkOff** - Turns Blink off - **Bold** - Turns Bold on - **BoldOff** - Turns Bold off-- **FileInfo** - Controls coloring of **FileInfo** objects.-- **Foreground** - Nested object to control foreground coloring-- **Formatting** - Controls default formatting for output streams - **Hidden** - Turns Hidden on - **HiddenOff** - Turns Hidden off-- **OutputRendering** - Control when output rendering is used - **Reverse** - Turns Reverse on - **ReverseOff** - Turns Reverse off - **Italic** - Turns Italic on - **ItalicOff** - Turns Italic off - **Underline** - Turns underlining on - **UnderlineOff** - Turns underlining off
+- **OutputRendering** - Control when output rendering is used
+- **Background** - Nested object to control background coloring
+- **Foreground** - Nested object to control foreground coloring
+- **Formatting** - Nested object that controls default formatting for output
+ streams
+- **Progress** - Nested object that controls the rendering of progress bars
+- **FileInfo** - (experimental) Nested object to control the coloring of
+ **FileInfo** objects.
The base members return strings of ANSI escape sequences mapped to their names. The values are settable to allow customization. For example, you could change
decorated strings using tab completion:
"$($PSStyle.Background.LightCyan)Power$($PSStyle.Underline)$($PSStyle.Bold)Shell$($PSStyle.Reset)" ```
-The `$PSStyle.Background` and `$PSStyle.Foreground` members are strings that
-contain the ANSI escape sequences for the 16 standard console colors as well as
-an `Rgb()` method to specify 24-bit color. The values are settable and can
-contain any number of ANSI escape sequences.
+The following members control how or when ANSI formatting is used:
+
+- `$PSStyle.OutputRendering` is a
+ `System.Management.Automation.OutputRendering` enum with the values:
+
+ - **Automatic**: This is the default. If the host supports VirtualTerminal,
+ then ANSI is always passed as-is, otherwise plaintext
+ - **ANSI**: ANSI is always passed through as-is
+ - **PlainText**: ANSI escape sequences are always stripped so that it is only
+ plain text
+ - **HostOnly**: This would be the macOS behavior where the ANSI escape
+ sequences are removed in redirected or piped output.
+
+- The `$PSStyle.Background` and `$PSStyle.Foreground` members are strings that
+ contain the ANSI escape sequences for the 16 standard console colors.
+
+ - Black
+ - White
+ - DarkGray
+ - LightGray
+ - Red
+ - LightRed
+ - Magenta
+ - LightMagenta
+ - Blue
+ - LightBlue
+ - Cyan
+ - LightCyan
+ - Green
+ - LightGreen
+ - Yellow
+ - LightYellow
+
+ The values are settable and can contain any number of ANSI escape sequences.
+ There is also an `FromRgb()` method to specify 24-bit color. There are two
+ ways to call the `FromRgb()` method.
+
+ - string FromRgb(byte red, byte green, byte blue)
+ - string FromRgb(int rgb)
+
+ Either of the following examples set the background color the 24-bit color
+ **Beige**.
+
+ ```powershell
+ $PSStyle.Background.FromRgb(245, 245, 220)
+ $PSStyle.Background.FromRgb(0xf5f5dc)
+ ```
+
+- `$PSStyle.Formatting` is a nested object to control default formatting of
+ debug, error, verbose, and warning messages. You can also control attributes
+ like bolding and underlining. It replaces `$Host.PrivateData` as the way to
+ manage colors for formatting rendering. `$Host.PrivateData` continues to
+ exist for backwards compatibility but is not connected to
+ `$PSStyle.Formatting`.
+
+- `$PSStyle.Progress` allows you to control progress view bar rendering.
+
+ - **Style** - An ANSI string setting the rendering style.
+ - **MaxWidth**` - Sets the max width of the view. Set to `0` for console
+ width. Defaults to `120`
+ - **View** - An enum with values, `Minimal` and `Classic`. `Classic` is the
+ existing rendering with no changes. `Minimal` is a single line minimal
+ rendering. `Minimal` is the default.
+ - **UseOSCIndicator** - Defaults to `$false`. Set this to `$true` for
+ terminals that support OSC indicators.
+
+ > [!NOTE]
+ > If the host doesn't support Virtual Terminal, `$PSStyle.Progress.View` is
+ > automatically set to `Classic`.
+
+ The following example sets the rendering style to a minimal progress bar.
+
+ ```powershell
+ $PSStyle.Progress.View = Minimal
+ ```
`$PSStyle.FileInfo` is a nested object to control the coloring of **FileInfo** objects.
objects.
extensions. The **Extension** member pre-includes extensions for archive and PowerShell files.
-`$PSStyle.Formatting` is a nested object to control default formatting of
-debug, error, verbose, and warning messages. You can also control attributes
-like bolding and underlining. It replaces `$Host.PrivateData` as the way to
-manage colors for formatting rendering. `$Host.PrivateData` continues to exist
-for backwards compatibility but is not connected to `$PSStyle.Formatting`.
-
-`$PSStyle.OutputRendering` is a `System.Management.Automation.OutputRendering`
-enum with the values:
--- **Automatic**: This is the default. If the host supports VirtualTerminal,
- then ANSI is always passed as-is, otherwise plaintext
-- **ANSI**: ANSI is always passed through as-is-- **PlainText**: ANSI escape sequences are always stripped so that it is only
- plain text
-- **HostOnly**: This would be the macOS behavior where the ANSI escape
- sequences are removed in redirected or piped output.
+> [!NOTE]
+> `$PSStyle.FileInfo` is only available when the `PSAnsiRenderingFileInfo`
+> experimental feature is enabled. For more information, see
+> [about_Experimental_Features](about_Experimental_Features.md) and
+> [Using experimental features](/powershell/scripting/learn/experimental-features).
### $PSUICulture
deleted when the `switch` statement completes execution. For more information,
see [about_Switch](about_Switch.md). Enumerators contain properties and methods you can use to retrieve loop values
-and change the current loop iteration. For more information, see [Using Enumerators](#using-enumerators).
+and change the current loop iteration. For more information, see
+[Using Enumerators](#using-enumerators).
### $this
An enumerator contains properties and methods you can use to advance or reset
iteration, or retrieve iteration values. Directly manipulating enumerators isn't considered best practice. -- Within loops, flow control keywords [break](about_Break.md) and [continue](about_Continue.md)
- should be preferred.
+- Within loops, flow control keywords [break](about_Break.md) and
+ [continue](about_Continue.md) should be preferred.
- Within functions that accept pipeline input, it's best practice to use parameters with the **ValueFromPipeline** or **ValueFromPipelineByPropertyName** attributes.
Microsoft.PowerShell.Core About Pwsh (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Pwsh.md
--- description: Explains how to use the `pwsh` command-line interface. Displays the command-line parameters and describes the syntax. Locale: en-US Previously updated : 10/05/2020 Last updated : 08/11/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pwsh?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Pwsh
Similar to `-Command`, when a script-terminating error occurs, the exit code is
set to `1`. However, unlike with `-Command`, when the execution is interrupted with <kbd>Ctrl</kbd>-<kbd>C</kbd> the exit code is `0`.
+> [!NOTE]
+> As of PowerShell 7.2, the **File** parameter only accepts `.ps1` files on
+> Windows. If another file type is provided an error is thrown. This behavior
+> is Windows specific. On other platforms, PowerShell attempts to run other
+> file types.
+ ### -Command | -c Executes the specified commands (and any parameters) as though they were typed
Microsoft.PowerShell.Utility Convertto Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 12/08/2020 Last updated : 08/11/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/convertto-csv?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: ConvertTo-Csv
Specifies when quotes are used in the CSV files. Possible values are:
- Never - don't quote anything - Always - quote everything (default behavior)-- AsNeeded - only quote fields that contain a delimiter character
+- AsNeeded - only quote fields that contain a delimiter character, double-quote, or newline
+ character
This parameter was added in PowerShell 7.0.
Microsoft.PowerShell.Utility Export Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Export-Csv.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 12/08/2020 Last updated : 08/11/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-csv?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Export-Csv
Specifies when quotes are used in the CSV files. Possible values are:
- Never - don't quote anything - Always - quote everything (default behavior)-- AsNeeded - only quote fields that contain a delimiter character
+- AsNeeded - only quote fields that contain a delimiter character, double-quote, or newline
+ character
This parameter was added in PowerShell 7.0.
Microsoft.PowerShell.Utility Import Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Import-Csv.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 08/19/2020 Last updated : 08/11/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Import-Csv --- # Import-Csv
-## SYNOPSIS
+## Synopsis
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## SYNTAX
+## Syntax
### DelimiterPath (Default)
Import-Csv -LiteralPath <String[]> -UseCulture [-Header <String[]>] [-Encoding <
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
Starting with PowerShell 6.0, `Import-Csv` now supports the W3C Extended Log File Format.
-## EXAMPLES
+## Examples
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## PARAMETERS
+## Parameters
### -Delimiter
-Specifies the delimiter that separates the property values in the CSV file.
-The default is a comma (,).
+Specifies the delimiter that separates the property values in the CSV file. The default is a comma
+(`,`).
-Enter a character, such as a colon (:).
-To specify a semicolon (;) enclose it in single quotation marks.
+Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in single
+quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
+quotation marks.
If you specify a character other than the actual string delimiter in the file, `Import-Csv` cannot create the objects from the CSV strings and will return the CSV strings.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## OUTPUTS
+## Outputs
### Object This cmdlet returns the objects described by the content in the CSV file.
-## NOTES
+## Notes
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
comments and ignored unless the comment starts with `#Fields:` and contains deli
column names. In that case, the cmdlet uses those column names. This is the standard format for Windows IIS and other web server logs. For more information, see [Extended Log File Format](https://www.w3.org/TR/WD-logfile.html).
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Write Progress (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Progress.md
The `Write-Progress` cmdlet displays a progress bar in a PowerShell command wind
status of a running command or script. You can select the indicators that the bar reflects and the text that appears above and below the progress bar.
+PowerShell 7.2 added the `$PSStyle` automatic variable that is used to control how PowerShell
+displays certain information using ANSI escape sequences. The `$PSStyle.Progress` member allows
+you to control progress view bar rendering.
+
+- `$PSStyle.Progress.Style` - An ANSI string setting the rendering style.
+- `$PSStyle.Progress.MaxWidth` - Sets the max width of the view. Set to `0` for console width.
+ Defaults to `120`
+- `$PSStyle.Progress.View` - An enum with values, `Minimal` and `Classic`. `Classic` is the existing
+ rendering with no changes. `Minimal` is a single line minimal rendering. `Minimal` is the default.
+
+> [!NOTE]
+> If the host doesn't support Virtual Terminal, `$PSStyle.Progress.View` is automatically set to
+> `Classic`.
+ ## EXAMPLES ### Example 1: Display the progress of a For loop
learn Experimental Features https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/docs-conceptual/learn/experimental-features.md
--- Previously updated : 07/22/2021 Last updated : 08/04/2021 Title: Using Experimental Features in PowerShell description: Lists the currently available experimental features and how to use them. ---
For more information about enabling or disabling these features, see
This article describes the experimental features that are available and how to use the feature.
-| Name | 6.2 | 7.0 | 7.1 | 7.2 |
-| ---------------------------------------------------------- | :-----: | :-----: | :-----: | :-----: |
-| PSTempDrive (mainstream in PS 7.0+) | &check; | | | |
-| PSUseAbbreviationExpansion (mainstream in PS 7.0+) | &check; | | | |
-| PSNullConditionalOperators (mainstream in PS 7.1+) | | &check; | | |
-| PSUnixFileStat (non-Windows only - mainstream in PS 7.1+) | | &check; | | |
-| PSCommandNotFoundSuggestion | &check; | &check; | &check; | &check; |
-| PSImplicitRemotingBatching | &check; | &check; | &check; | &check; |
-| Microsoft.PowerShell.Utility.PSManageBreakpointsInRunspace | | &check; | &check; | &check; |
-| PSDesiredStateConfiguration.InvokeDscResource | | &check; | &check; | &check; |
-| PSNativePSPathResolution | | | &check; | &check; |
-| PSCultureInvariantReplaceOperator | | | &check; | &check; |
-| PSNotApplyErrorActionToStderr | | | &check; | &check; |
-| PSSubsystemPluginModel | | | &check; | &check; |
-| PSAnsiProgress | | | | &check; |
-| PSAnsiRendering | | | | &check; |
-| PSNativeCommandArgumentPassing | | | | &check; |
+Legend
+
+- &#x2714;&#xfe0f; - indicates that the experimental feature is available in the version of
+ PowerShell
+- &#x2705; - indicates the version of PowerShell where the experimental feature became mainstream
+- &#x274c; - indicates the version of PowerShell where the experimental feature was removed
+
+| Name | 7.0 | 7.1 | 7.2 |
+| ------------------------------------------------------------- | :--------------: | :--------------: | :--------------: |
+| PSNullConditionalOperators | &#x2714;&#xfe0f; | &#x2705; | |
+| PSUnixFileStat (non-Windows only) | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; | &#x2705; |
+| Microsoft.PowerShell.Utility.PSManageBreakpointsInRunspace | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; | &#x2705; |
+| PSCultureInvariantReplaceOperator | | &#x2714;&#xfe0f; | &#x2705; |
+| PSNotApplyErrorActionToStderr | | &#x2714;&#xfe0f; | &#x2705; |
+| PSImplicitRemotingBatching | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; | &#x274c; |
+| PSCommandNotFoundSuggestion | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; |
+| PSDesiredStateConfiguration.InvokeDscResource | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; |
+| PSNativePSPathResolution | | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; |
+| PSSubsystemPluginModel | | &#x2714;&#xfe0f; | &#x2714;&#xfe0f; |
+| PSNativeCommandArgumentPassing | | | &#x2714;&#xfe0f; |
+| PSAnsiRenderingFileInfo | | | &#x2714;&#xfe0f; |
+| PSLoadAssemblyFromNativeCode | | | &#x2714;&#xfe0f; |
## Microsoft.PowerShell.Utility.PSManageBreakpointsInRunspace
In this example, a job is started and a breakpoint is set to break when the `Set
run. The runspace is stored in a variable and passed to the `Get-PSBreakPoint` command with the **Runspace** parameter. You can then inspect the breakpoint in the `$breakpoint` variable.
-## PSAnsiRendering
-
-This experiment was added in PowerShell 7.2. The feature enables changes how the PowerShell engine
-outputs text and add the `$PSStyle` automatic variable to control ANSI rendering of string output.
-
-```powershell
-PS> $PSStyle | Get-Member
-
- TypeName: System.Management.Automation.PSStyle
-
-Name MemberType Definition
-Equals Method bool Equals(System.Object obj)
-FormatHyperlink Method string FormatHyperlink(string text, uri link)
-GetHashCode Method int GetHashCode()
-GetType Method type GetType()
-ToString Method string ToString()
-Background Property System.Management.Automation.PSStyle+BackgroundColor Background {get;}
-Blink Property string Blink {get;}
-BlinkOff Property string BlinkOff {get;}
-Bold Property string Bold {get;}
-BoldOff Property string BoldOff {get;}
-FileInfo Property System.Management.Automation.PSStyle+FileInfoFormatting {get;}
-Foreground Property System.Management.Automation.PSStyle+ForegroundColor Foreground {get;}
-Formatting Property System.Management.Automation.PSStyle+FormattingData Formatting {get;}
-Hidden Property string Hidden {get;}
-HiddenOff Property string HiddenOff {get;}
-Italic Property string Italic {get;}
-ItalicOff Property string ItalicOff {get;}
-OutputRendering Property System.Management.Automation.OutputRendering OutputRendering {get;set;}
-Progress Property System.Management.Automation.PSStyle+ProgressConfiguration Progress {get;}
-Reset Property string Reset {get;}
-Reverse Property string Reverse {get;}
-ReverseOff Property string ReverseOff {get;}
-Strikethrough Property string Strikethrough {get;}
-StrikethroughOff Property string StrikethroughOff {get;}
-Underline Property string Underline {get;}
-UnderlineOff Property string UnderlineOff {get;}
-```
-
-The base members return strings of ANSI escape sequences mapped to their names. The values are
-settable to allow customization.
-
-For more information, see [about_Automatic_Variables](/powershell/module/Microsoft.PowerShell.Core/About/about_Automatic_Variables)
-
-> [!NOTE]
-> For C# developers, you can access `PSStyle` as a singleton. Usage will look like this:
->
-> ```csharp
-> string output = $"{PSStyle.Instance.Foreground.Red}{PSStyle.Instance.Bold}Hello{PSStyle.Instance.Reset}";
-> ```
->
-> `PSStyle` exists in the System.Management.Automation namespace.
-
-Along with access to `$PSStyle`, this introduces changes to the PowerShell engine. The PowerShell
-formatting system is updated to respect `$PSStyle.OutputRendering`.
--- `StringDecorated` type is added to handle ANSI escaped strings.-- `string IsDecorated` boolean property is added to return if the string contains ANSI escape
- sequences based on if the string contains ESC or C1 CSI.
-- The `Length` property returns _only_ the length for the text without the ANSI escape sequences.-- `StringDecorated Substring(int contentLength)` method returns a substring starting at index 0 up
- to the content length that is not a part of ANSI escape sequences. This is needed for table
- formatting to truncate strings and preserve ANSI escape sequences that don't take up printable
- character space.
-- `string ToString()` method stays the same and returns the plaintext version of the string.-- `string ToString(bool Ansi)` method returns the raw ANSI embedded string if the `Ansi` parameter
- is true. Otherwise, a plaintext version with ANSI escape sequences removed is returned.
-
-The `FormatHyperlink(string text, uri link)` returns a string containing ANSI escape sequence used
-to decorate hyperlinks. Some terminal hosts, like the
-[Windows Terminal](https://www.microsoft.com/p/windows-terminal/9n0dx20hk701), support this markup,
-which makes the rendered text clickable in the terminal.
-
-Support for ANSI escape sequences can be turned off using the **TERM** or **NO_COLOR** environment
-variables.
-
-The following values of `$env:TERM` change the behavior as follows:
--- `dumb` - set `$Host.UI.SupportsVirtualTerminal = $false`-- `xterm-mono` - set `$PSStyle.OutputRendering = PlainText`-- `xtermm` - set `$PSStyle.OutputRendering = PlainText`-
-If `$env:NO_COLOR` exists, then sets `$PSStyle.OutputRendering = PlainText`. For more information,
-see [https://no-color.org/](https://no-color.org/).
- ## PSAnsiRenderingFileInfo This experiment was added in PowerShell 7.2. This feature adds the $PSStyle.FileInfo member and
enables coloring of specific file types.
- `$PSStyle.FileInfo.Extension` - Use this member to define colors for different file extensions. The **Extension** member pre-includes extensions for archive and PowerShell files.
-For more information, see [about_Automatic_Variables](/powershell/module/Microsoft.PowerShell.Core/About/about_Automatic_Variables)
-
-> [!NOTE]
-> You must have the **PSAnsiRendering** experimental feature enabled to use this feature.
-
-## PSAnsiProgress
-
-This experiment was added in PowerShell 7.2. The feature adds the `$PSStyle.Progress` member and
-allows you to control progress view bar rendering.
--- `$PSStyle.Progress.Style` - An ANSI string setting the rendering style.-- `$PSStyle.Progress.MaxWidth` - Sets the max width of the view. Set to `0` for console width.
- Defaults to `120`
-- `$PSStyle.Progress.View` - An enum with values, `Minimal` and `Classic`. `Classic` is the existing
- rendering with no changes. `Minimal` is a single line minimal rendering. `Minimal` is the default.
-
-> [!NOTE]
-> If the host doesn't support Virtual Terminal, `$PSStyle.Progress.View` is automatically set to
-> `Classic`.
-
-The following example updates the rendering style to a minimal progress bar.
-
-```powershell
-$PSStyle.Progress.View.Minimal
-```
+For more information, see
+[about_Automatic_Variables](/powershell/module/Microsoft.PowerShell.Core/About/about_Automatic_Variables).
> [!NOTE] > You must have the **PSAnsiRendering** experimental feature enabled to use this feature.
the pipeline is the only data returned to the client. This decreases the amount
and forth between client and remote session, and also reduces the amount of object serialization and de-serialization.
+> [!NOTE]
+> This experimental feature was removed in PowerShell 7.2 and is no longer supported.
+
+## PSLoadAssemblyFromNativeCode
+
+Exposes an API to allow assembly loading from native code.
+
+## PSNativeCommandArgumentPassing
+
+When this experimental feature is enabled PowerShell uses the `ArgumentList` property of the
+`StartProcessInfo` object rather than our current mechanism of reconstructing a string when invoking
+a native executable.
+
+> [!CAUTION]
+> The new behavior is a **breaking change** from current behavior. This may break scripts and
+> automation that work around the various issues when invoking native applications. Historically,
+> quotes must be escaped and it is not possible to provide empty arguments to a native application.
+
+This feature adds a new automatic variable `$PSNativeCommandArgumentPassing` that allows you to
+select the behavior at runtime. The valid values are `Legacy`, `Standard`, and `Windows`. `Legacy`
+is the historic behavior. The default when the experimental feature is enabled is the new `Standard`
+behavior.
+
+When the preference variable is set to `Windows`, invocations of the following files automatically
+use the `Legacy` style argument passing.
+
+- `cmd.exe`
+- `cscript.exe`
+- `wscript.exe`
+- ending with `.bat`
+- ending with `.cmd`
+- ending with `.vbs`
+
+If the `$PSNativeArgumentPassing` is set to either `Legacy` or `Standard`, the check for these files
+do not occur. The default behavior is platform specific. On Windows platforms, the default setting
+is `Windows` and non-Windows platforms is `Standard`.
+
+New behaviors made available by this change:
+
+- Literal or expandable strings with embedded quotes the quotes are now preserved:
+
+ ```powershell
+ PS > $a = 'a" "b'
+ PS > $PSNativeCommandArgumentPassing = "Legacy"
+ PS > testexe -echoargs $a 'a" "b' a" "b
+ Arg 0 is <a b>
+ Arg 1 is <a b>
+ Arg 2 is <a b>
+ PS > $PSNativeCommandArgumentPassing = "Standard"
+ PS > testexe -echoargs $a 'a" "b' a" "b
+ Arg 0 is <a" "b>
+ Arg 1 is <a" "b>
+ Arg 2 is <a b>
+ ```
+
+- Empty strings as arguments are now preserved:
+
+ ```powershell
+ PS> $PSNativeCommandArgumentPassing = "Legacy"
+ PS> testexe -echoargs '' a b ''
+ Arg 0 is <a>
+ Arg 1 is <b>
+ PS> $PSNativeCommandArgumentPassing = "Standard"
+ PS> testexe -echoargs '' a b ''
+ Arg 0 is <>
+ Arg 1 is <a>
+ Arg 2 is <b>
+ Arg 3 is <>
+ ```
+
+The new behavior does not change invocations that look like this:
+
+```powershell
+PS> $PSNativeCommandArgumentPassing = "Legacy"
+PS> testexe -echoargs -k com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect
+Arg 0 is <-k>
+Arg 1 is <com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect>
+PS> $PSNativeCommandArgumentPassing = "Standard"
+PS> testexe -echoargs -k com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect
+Arg 0 is <-k>
+Arg 1 is <com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect>
+```
+
+Additionally, parameter tracing is now provided so `Trace-Command` provides useful information
+for debugging.
+
+```powershell
+PS> $PSNativeCommandArgumentPassing = "Legacy"
+PS> trace-command -PSHOST -Name ParameterBinding { testexe -echoargs $a 'a" "b' a" "b }
+DEBUG: 2021-02-01 17:19:53.6438 ParameterBinding Information: 0 : BIND NAMED native application line args [/Users/james/src/github/forks/jameswtruher/PowerShell-1/test/tools/TestExe/bin/testexe]
+DEBUG: 2021-02-01 17:19:53.6440 ParameterBinding Information: 0 : BIND argument [-echoargs a" "b a" "b "a b"]
+DEBUG: 2021-02-01 17:19:53.6522 ParameterBinding Information: 0 : CALLING BeginProcessing
+Arg 0 is <a b>
+Arg 1 is <a b>
+Arg 2 is <a b>
+PS> $PSNativeCommandArgumentPassing = "Standard"
+PS> trace-command -PSHOST -Name ParameterBinding { testexe -echoargs $a 'a" "b' a" "b }
+DEBUG: 2021-02-01 17:20:01.9829 ParameterBinding Information: 0 : BIND NAMED native application line args [/Users/james/src/github/forks/jameswtruher/PowerShell-1/test/tools/TestExe/bin/testexe]
+DEBUG: 2021-02-01 17:20:01.9829 ParameterBinding Information: 0 : BIND cmd line arg [-echoargs] to position [0]
+DEBUG: 2021-02-01 17:20:01.9830 ParameterBinding Information: 0 : BIND cmd line arg [a" "b] to position [1]
+DEBUG: 2021-02-01 17:20:01.9830 ParameterBinding Information: 0 : BIND cmd line arg [a" "b] to position [2]
+DEBUG: 2021-02-01 17:20:01.9831 ParameterBinding Information: 0 : BIND cmd line arg [a b] to position [3]
+DEBUG: 2021-02-01 17:20:01.9908 ParameterBinding Information: 0 : CALLING BeginProcessing
+Arg 0 is <a" "b>
+Arg 1 is <a" "b>
+Arg 2 is <a b>
+```
+ ## PSNativePSPathResolution If a PSDrive path that uses the FileSystem provider is passed to a native command, the resolved file
variables must use `{}` around the variable name like: `${x?}?.propertyName` or
> This feature has moved out of the experimental phase and is a mainstream feature in PowerShell 7.1 > and higher.
-## PSTempDrive
-
-Creates the `TEMP:` PSDrive mapped to user's temporary directory path.
-
-> [!NOTE]
-> This feature has moved out of the experimental phase and is a mainstream feature in PowerShell 7
-> and higher.
- ## PSUnixFileStat This feature provides new behavior to include data from the Unix **stat** API in the output of the
drwxr-xr-x jimtru staff 11/8/2019 10:37 896 tools
> This feature has moved out of the experimental phase and is a mainstream feature in PowerShell 7.1 > and higher.
-## PSUseAbbreviationExpansion
-
-This feature enables tab-completion of abbreviated cmdlets and functions:
-
-For example:
--- `i-psdf<tab>` returns `Import-PowerShellDataFile`.-- `u-akvmssdr<tab>` returns `Undo-AzKeyVaultManagedStorageSasDefinitionRemoval`-
-This only works for tab completion (interactive use), so `i-psdf` is not a valid cmdlet name in a
-script.
-
-> [!NOTE]
-> This feature has moved out of the experimental phase and is a mainstream feature in PowerShell 7
-> and higher.
- ## PSSubsystemPluginModel This feature enables the subsystem plugin model in PowerShell. The feature makes it possible to
The experimental feature includes a new cmdlet,
[Get-PSSubsystem](xref:Microsoft.PowerShell.Core.Get-PSSubsystem). This cmdlet is only available when the feature is enabled. This cmdlet returns information about the subsystems that are available on the system.-
-## PSNativeCommandArgumentPassing
-
-When this experimental feature is enabled PowerShell uses the `ArgumentList` property of the
-`StartProcessInfo` object rather than our current mechanism of reconstructing a string when invoking
-a native executable.
-
-This feature adds a new automatic variable `$PSNativeCommandArgumentPassing` that allows you to
-select the behavior at runtime. The valid values are `Legacy` and `Standard`. `Legacy` is the
-historic behavior. The default when the experimental feature is enabled is the new `Standard`
-behavior.
-
-> [!CAUTION]
-> The new behavior is a **breaking change** from current behavior. This may break scripts and
-> automation that work-around the various issues when invoking native applications. Historically,
-> quotes must be escaped and it is not possible to provide empty arguments to a native application.
-
-New behaviors made available by this change:
--- Literal or expandable strings with embedded quotes the quotes are now preserved:-
- ```powershell
- PS > $a = 'a" "b'
- PS > $PSNativeCommandArgumentPassing = "Legacy"
- PS > testexe -echoargs $a 'a" "b' a" "b
- Arg 0 is <a b>
- Arg 1 is <a b>
- Arg 2 is <a b>
- PS > $PSNativeCommandArgumentPassing = "Standard"
- PS > testexe -echoargs $a 'a" "b' a" "b
- Arg 0 is <a" "b>
- Arg 1 is <a" "b>
- Arg 2 is <a b>
- ```
--- Empty strings as arguments are now preserved:-
- ```powershell
- PS> $PSNativeCommandArgumentPassing = "Legacy"
- PS> testexe -echoargs '' a b ''
- Arg 0 is <a>
- Arg 1 is <b>
- PS> $PSNativeCommandArgumentPassing = "Standard"
- PS> testexe -echoargs '' a b ''
- Arg 0 is <>
- Arg 1 is <a>
- Arg 2 is <b>
- Arg 3 is <>
- ```
-
-The new behavior does not change invocations that look like this:
-
-```powershell
-PS> $PSNativeCommandArgumentPassing = "Legacy"
-PS> testexe -echoargs -k com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect
-Arg 0 is <-k>
-Arg 1 is <com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect>
-PS> $PSNativeCommandArgumentPassing = "Standard"
-PS> testexe -echoargs -k com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect
-Arg 0 is <-k>
-Arg 1 is <com:port=\\devbox\pipe\debug,pipe,resets=0,reconnect>
-```
-
-Additionally, parameter tracing is now provided so `Trace-Command` will provide useful information
-for debugging.
-
-```powershell
-PS> $PSNativeCommandArgumentPassing = "Legacy"
-PS> trace-command -PSHOST -Name ParameterBinding { testexe -echoargs $a 'a" "b' a" "b }
-DEBUG: 2021-02-01 17:19:53.6438 ParameterBinding Information: 0 : BIND NAMED native application line args [/Users/james/src/github/forks/jameswtruher/PowerShell-1/test/tools/TestExe/bin/testexe]
-DEBUG: 2021-02-01 17:19:53.6440 ParameterBinding Information: 0 : BIND argument [-echoargs a" "b a" "b "a b"]
-DEBUG: 2021-02-01 17:19:53.6522 ParameterBinding Information: 0 : CALLING BeginProcessing
-Arg 0 is <a b>
-Arg 1 is <a b>
-Arg 2 is <a b>
-PS> $PSNativeCommandArgumentPassing = "Standard"
-PS> trace-command -PSHOST -Name ParameterBinding { testexe -echoargs $a 'a" "b' a" "b }
-DEBUG: 2021-02-01 17:20:01.9829 ParameterBinding Information: 0 : BIND NAMED native application line args [/Users/james/src/github/forks/jameswtruher/PowerShell-1/test/tools/TestExe/bin/testexe]
-DEBUG: 2021-02-01 17:20:01.9829 ParameterBinding Information: 0 : BIND cmd line arg [-echoargs] to position [0]
-DEBUG: 2021-02-01 17:20:01.9830 ParameterBinding Information: 0 : BIND cmd line arg [a" "b] to position [1]
-DEBUG: 2021-02-01 17:20:01.9830 ParameterBinding Information: 0 : BIND cmd line arg [a" "b] to position [2]
-DEBUG: 2021-02-01 17:20:01.9831 ParameterBinding Information: 0 : BIND cmd line arg [a b] to position [3]
-DEBUG: 2021-02-01 17:20:01.9908 ParameterBinding Information: 0 : CALLING BeginProcessing
-Arg 0 is <a" "b>
-Arg 1 is <a" "b>
-Arg 2 is <a b>
-```