Skip to content

Update the default/acceptable values for Encoding parameter in v6.0 #2000

@matt9ucci

Description

@matt9ucci

Issue Details

According to PowerShell/PowerShell#5080, the default/acceptable values for Encoding parameter has been changed since v6.0. But the change is not documented (e.g. Out-File -Encoding and Set/Add-Content).

The followings are the list of cmdlets which have Encoding parameter to be updated:

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-rc.2
PSEdition                      Core
GitCommitId                    v6.0.0-rc.2
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS> Get-Command | Where-Object { $_.Parameters.Keys -contains 'Encoding' }

CommandType    Name                Version    Source
-----------    ----                -------    ------
Cmdlet         Add-Content         3.1.0.0    Microsoft.PowerShell.Management
Cmdlet         Export-Clixml       3.1.0.0    Microsoft.PowerShell.Utility
Cmdlet         Export-Csv          3.1.0.0    Microsoft.PowerShell.Utility
Cmdlet         Export-PSSession    3.1.0.0    Microsoft.PowerShell.Utility
Cmdlet         Format-Hex          3.1.0.0    Microsoft.PowerShell.Utility
Cmdlet         Get-Content         3.1.0.0    Microsoft.PowerShell.Management
Cmdlet         Import-Csv          3.1.0.0    Microsoft.PowerShell.Utility
Cmdlet         Out-File            3.1.0.0    Microsoft.PowerShell.Utility
Cmdlet         Select-String       3.1.0.0    Microsoft.PowerShell.Utility
Cmdlet         Send-MailMessage    3.1.0.0    Microsoft.PowerShell.Utility
Cmdlet         Set-Content         3.1.0.0    Microsoft.PowerShell.Management

Version(s) of document impacted

  • Impacts 6 document
  • Impacts 5.1 document
  • Impacts 5.0 document
  • Impacts 4.0 document
  • Impacts 3.0 document

Reason(s) for not selecting all version of documents

  • The documented feature was introduced in selected version of PowerShell
  • This issue only shows up in selected version of the document

Metadata

Metadata

Assignees

Labels

Pri0Priority - Highest

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions