Converting a certificate from a .cer to .pem using powershell or .bat

I am trying to find a way to script converting a .cer formated cert to a .pem format either using powershell or cmdline native to windows. Does anyone have any idea how this might be done?

3

1 Answer

Run certutil -encode .pem

You could also download the PSPKI module, and I think there is a cmdlet in there for this as well, but certutil is built into every single Windows machine since like Windows 2000.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like