How Can I Import Certificate .SST File Into A GPO?
We're in a semi disconnected environment and I need to import an .SST file monthly with current root certificates and import the file into a Group Policy Object for distribution.
I've been doing it manually for a few months but thought it'd be a fun little thing to automate as I get started with PoSh.
Here's what I have so far and it seems to work until the last step when I need to import the .SST into the GPO.
#Establish variables
$TodaysDate = Get-Date -Format yyyyMMdd
$FileNameFormat = "roots" + $TodaysDate + ".sst"
#Download certificates using certutil on UpdateServer.fqdn.com
e:\certutil.exe -generateSSTFromWU roots.sst
#Rename SST with today's date
Rename-Item .\roots.sst -NewName $FileNameFormat
#Copy to Certs dir with today's date
Copy-Item .\$FileNameFormat '\\FileServer\certs\'
#Import into 'Certificates root' GPO
Computer Configuration\Policies\Windows Settings\Security Settings\Public Key Policies/Trusted Root Certification Authorities.
Is there a way to import the certificates into a GPO with PS?
*Edit Code Block instead of Inline Code.
Posted Jul 15, 2020, 1:26 AM UTC · edited
Not sure, did you see this?
https://stackoverflow.com/questions/46493965/import-certificate-to-the-group-policy-store-with-powershell
I'm a little new to PS so I'll see if I can understand how to use that.
Thanks for the link!