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.
To import a PFX file you can use
Import-PfxCertificate, for example
Import-PfxCertificate -FilePath YOUR_PFX_FILE.pfx -Password (ConvertTo-SecureString -String "THE_PFX_PASSWORD" -AsPlainText -Force)
To do this on a remote computer, you can use
Invoke-Command -ComputerName (and use an UNC path for the PFX file).