Search notes:

PowerShell: Cmdlets with the -Encoding parameter

Cmdlets with an -encoding parameter are:

Accepted values for -encoding

The accepted values for -encoding are
In PowerShell 6.2 and higher, its also possible to specify the encoding's code page id:
'abc' | out-file abc.txt -encoding  65001
'abc' | out-file abc.txt -encoding   1251
'abc' | out-file abc.txt -encoding 'windows-1251'

Default value

The default value for encoding is dependent on the PowerShell version. In PowerShell 7, it is utf8NoBOM, in PowerShell 5.1, it is unicode.

See also

Cmdlet parameters
Encoding in PowerShell
the proeference variable $OutputEncoding.
The Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding enumeration.

Index