PowerShell
PowerShell copied to clipboard
Set-Content Encoding Byte is not available in Powershell 7
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. :)