title: Convert cert to pfx or p12 file format
body: <p>Convert .crt, .csr, and .key files to .pfx or .p12 using powershell on Windows server 2016.</p>
  
  <p>I have .cert, .csr, and .key files. But in order to execute the "netsh http add sslcert ..." command, I need the .pfx or .p12 file. And I need this to be done in powershell. Openssl is not an option.</p>
  
  <p>I have accomplished the above using openssl. But Im restricted from downloading software now, so thats not an option any more. Im looking for equivalent of <code>openssl pkcs12 -export -out domain.name.pfx -inkey key.key -in cert.crt</code> command in powershell.</p>