We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9025e6b commit 9c84bc3Copy full SHA for 9c84bc3
GPRegistryPolicyParser.psm1
@@ -185,7 +185,12 @@ Function Import-PolFile
185
$index = 0
186
187
[string] $policyContents = Get-Content $Path -Raw
188
- [byte[]] $policyContentInBytes = Get-Content $Path -Raw -Encoding Byte
+
189
+ if ($psversiontable.PSVersion.Major -lt 6) {
190
+ [byte[]] $policyContentInBytes = Get-Content $Path -Raw -Encoding Byte
191
+ } else {
192
+ [byte[]] $policyContentInBytes = Get-Content $Path -AsByteStream
193
+ }
194
195
# 4 bytes are the signature PReg
196
$signature = [System.Text.Encoding]::ASCII.GetString($policyContents[0..3])
0 commit comments