Install certificate with PowerShell on remote server

Question:

I want to install a certificate (X.509) created with makecert.exe on a remote server. I am not able to use psexec or something like that but have to use PowerShell.

  • Server operating system: Windows Server 2008 R2
  • PowerShell version: 4

Question: How to install a certificate with PowerShell on a remote server.

Answer:

To import a PFX file you can use Import-PfxCertificate, for example

To do this on a remote computer, you can use Invoke-Command -ComputerName (and use an UNC path for the PFX file).

Source:

Install certificate with PowerShell on remote server by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply