Summary of the new feature/enhancement
Tee-Object currently invariably uses the default character encoding when teeing to a file (-Path aka -Filepath, -LiteralPath), which in PS Core is BOM-less UTF-8
However, sometimes you need a specific character encoding, and Tee-Object currently offers no way to specify a different encoding.
Proposed technical implementation details (optional)
Introduce an -Encoding parameter (to be combined only with the -Path / -FilePath or -LiteralPath, analogous to the parameter of the same name already supported by other write-to-file cmdlets such as Out-File.
Summary of the new feature/enhancement
Tee-Objectcurrently invariably uses the default character encoding when teeing to a file (-Pathaka-Filepath,-LiteralPath), which in PS Core is BOM-less UTF-8However, sometimes you need a specific character encoding, and
Tee-Objectcurrently offers no way to specify a different encoding.Proposed technical implementation details (optional)
Introduce an
-Encodingparameter (to be combined only with the-Path/-FilePathor-LiteralPath, analogous to the parameter of the same name already supported by other write-to-file cmdlets such asOut-File.