Skip to content

Get-Content does not support -encoding 'byte' #14537

@mgreenegit

Description

@mgreenegit

This can be observed by testing the GPRegistryPolicyParser module using PowerShell 7.1. When Get-Content is called to read files exported from Group Policy using Backup-GPO, a warning is written that 'byte' is not a valid input for -encoding parameter. However, it does not seem that the module is functionally impacted. It still does what it is intended to do, other than returning the error.

Could someone from PowerShell advise the best approach for the issue in the other repo? If 'byte' is no longer available, should we remove the -encoding parameter, or use some other value?

PowerShell/GPRegistryPolicyParser#6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.WG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions