title: Extract certificate (.cer) from installer programmatically
body: <p>I am building an installer and need to extract the .cer so that it can be added to trusted publisher, similar to this question/answer.</p>
  
  <p><a href="https://superuser.com/a/464233">https://superuser.com/a/464233</a></p>
  
  <p>I've managed to do that and everything works fine. Can the "Copy to file" from within Digital Signatures tab be automated using PowerShell or something similar ?</p>