2

I am using winhttpcertcfg to install a certificate into "Certificates (Local Computer) / Personal / Certificates" (MMC)

winhttpcertcfg -i "C:\test.pfx" -c LOCAL_MACHINE\My -p removedForQuestion

Running this command shows the following output (no errors, but nothing suggesting it has worked either:

Microsoft (R) WinHTTP Certificate Configuration Tool

Copyright (C) Microsoft Corporation 2001.

When I search for the certificate (I checked Current User as well as Local Computer) there is nothing to see in MMC.

Community
  • 1
  • 1
Fenton
  • 241,084
  • 71
  • 387
  • 401

3 Answers3

1

It actually works just fine with certutil, so I'm using that instead of winhttpcertcfg for the install and then granting permissions separately.

certutil -f -p removedForQuestion -importpfx "C:\test.pfx"
Fenton
  • 241,084
  • 71
  • 387
  • 401
1

There are several complexities to be considered while choosing an alternative for winhttpcertcfg.

See answer

https://serverfault.com/questions/620013/importing-a-certificate-and-granting-permissions-on-windows-server-2012-r2/622556#622556

Community
  • 1
  • 1
0

http://msdn.microsoft.com/en-us/library/windows/desktop/aa384088(v=vs.85).aspx

-i Specifies that the certificate is to be imported from a Personal Information Exchange (PFX) file. This parameter must be followed by the name of the file. When this parameter is specified, "-a" and "-c" must also be specified.