- Windows PowerShell
If you have a binary encoded .cer (certificate) file that you need to get into a Base64 format, you can either follow the advice and use OpenSSL to convert it or you can import it into the Windows Certificate Store and re-export it.
If you want to do it automatically, without having to download and install anything else, neither option is particularly appealing.
You can use the following function to convert the binary encoded file into a Base64 ASCII encoded file
Convert the file, retaining the source file
Convert the binary file, overwriting it with the Base64 file