Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powershell Script to install trusted publisher certificates

Tags:

I use powershell app deployment tool kit and I have a script to install a few MSI's. For one of the MSI's, I have a certificate (cert.cer) that I need to install on each machine's trusted publisher.

After doing some digging, I came up with this:

certutil.exe -addstore TrustedPublisher cert.cer certutil.exe -addstore root cert.cer

This does not work, no errors, I am just still being prompted to have to accept an install from a non trusted publisher.

like image 370
mpeytonfan18 Avatar asked Feb 28 '18 21:02

mpeytonfan18


1 Answers

Open PowerShell as administrator and run:

Import-Certificate -FilePath cert.cer -CertStoreLocation Cert:\LocalMachine\TrustedPublisher
like image 180
Booga Roo Avatar answered Sep 19 '22 05:09

Booga Roo