Tired of wading throug MMC jungles, I need a way to import a given .cer file (which contains just a public key) into machine-wide certificate store (don't know how is it called in English since I'm using a localized version of Windows) into "Personal Certificates" folder. Both cmd.exe or PowerShell versions will be fine.
| |||
|
feedback
|
|
Powershell solution, using System.Security.Cryptograpy.X509Certificates:
Sorry for all the full namespace specifications, but there's no "using" directive in PowerShell. | |||
feedback
|
|
I don't know how to import it from the command line, but you don't need MMCs in order to install a certificate, double-clicking on it is just enough. | |||
|
feedback
|
|
This is wrong. See Massimo's post with the powershell reflection assembly. Uh ... the powershell way is to open the MMC. Technet Link This command opens the Certificates MMC snap-in to manage the specified certificate.
| |||||||||||||||
feedback
|