AutomoxAutomox

Install Certificate to Trusted Root CA in Windows

CraigJ1983
March 30, 2023 at 9:49 am UTC
#Worklets

Hi all, first time posting in here!

Was hoping the Automox community could help me. Is there a Worklet at all for pushing out a Certificate in Windows to the Trusted Root CA?  I can see that there is one for Mac in the built in Worklet catalog but no sign of a Windows one

Any help would be appreciated!

Thank you

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (2)

jlgonitzkeApril 12, 2023
#1

Do your know Worklet. Upload the cert. to it.

Then do this:

$file = "CERT FILE NAME GOES HERE"

#Adds the certificate to Computer Trusted Root Authority
Import-Certificate -FilePath $file -CertStoreLocation Cert:\LocalMachine\Root

jack.smithApril 13, 2023
#2

You can add this to evaluation to see if the certificate exists too

 

$cert  = Get-ChildItem Cert:\LocalMachine\Root | Where-Object Thumbprint -eq "you-certificates-thumbprint"
IF(!$cert)
{
    exit 1
}