R
R
Ruslan-Strannik2020-03-05 13:43:49
VPN
Ruslan-Strannik, 2020-03-05 13:43:49

How to import a certificate through CertMgr.exe?

I'm trying to set up certificate import on machines with WIN7 WIN10 OS via a batch file.
Used to connect VPN over SSTP.
You need to import the certificate into "machine trusted root certificates". It is the computer, not the user.
I achieved that I created a folder where I threw the certificate itself, CertMgr.exe, import.bat I
copy this case to the experimental machine, I run the import as administrator - the certificate is imported in the wrong place. in personal .. That's the rub.

import.bat
certmgr.exe -add -c CAcert.cer -s -r localMachine root

how many articles I watched on this topic - I realized that the line is correct. and why it does not shove into the desired branch, I can not understand.
Tell me please

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
Ziptar, 2020-03-05
@Ruslan-Strannik

You are using powershell. The Import-certificate cmdlet allows you to directly specify the target store, including machine stores.

K
Keffer, 2020-03-05
@Keffer

Because the script does not have enough rights, it must be run on behalf of the machine in this case, otherwise it will push the certificate to the user from which it worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question