PowerShell icon indicating copy to clipboard operation
PowerShell copied to clipboard

Set-Content Encoding Byte is not available in Powershell 7

Open gitnol opened this issue 6 months ago • 0 comments

https://github.com/J0F3/PowerShell/blob/71ad3619a08a58cf770fe23f7cfe55b309ac0d53/Request-Certificate.ps1#L424

Change the line 424 to: [System.IO.File]::WriteAllBytes($pfxPath, $certbytes)

Reason: At Least in Powershell 7 the parameter Encoding Byte is not Available as parameter of Set-Content. Use the System.IO.File Class directly. :)

gitnol avatar Aug 24 '24 16:08 gitnol