2

I'm trying to use a windows XP batch file to automate importing .p12 certificates into what the MMC "Certificates" snap-in calls Certificates (Local Computer) \Personal\Certificates

certmgr.msc might be the right tool for this purpose, but I have tried

a:\certmgr.msc /add /c /s /r localMachine a:\<certname>.p12

importpfx -f a:\certs\<certname>.* -p <cert pw> -t MACHINE -s My

And a few others without success. Usually, the MMC just opens with the certificates snap in. I've not seen any certs actually moved or imported anywhere as a result.

I've also tried the cert path\name without the environmental variable and wild card, but the certs I get may or may not simply be the workstation name.p12..

Any suggestions?

-Clay

4

1 に答える 1

1

以下のコードは、Windows 8 および Windows Server 2012 R2 で機能しました。バッチファイルで次のコマンドを使用しました。

certutil -f -sid 22 -p [Password1] -importpfx "My"  "%~dp0\whatever.pfx" NoRoot

-sid WELL_KNOWN_SID_TYPE -- Numeric SID
22 -- "Local System", 23 -- "Network Service", 24 -- "Local Service"
于 2016-11-02T20:33:23.550 に答える