To import root certificates using a PowerShell script:

  1. Open PowerShell in Administrator mode.
  2. Type the following command; then, press ENTER.
    Import-PfxCertificate -Password (ConvertTo-SecureString -String "truststore_password" -AsPlainText -Force) -CertStoreLocation Cert:\LocalMachine\Root -FilePath truststore_filepath

    where:

    truststore_password
    is the password that is used to access the truststore file.
    truststore_filepath
    is the path to the directory where the truststore file is located.
The root certificates are imported into the following location in the Windows certificate store: Certificates > Trusted Root Certification Authorities > Certificates.
Note: At times, Windows doesn't trust the imported certificates and imports them into Certificates > Intermediate Certificate Authorities > Certificates. In such cases, manually copy the imported certificates from Intermediate Certificate Authorities to Trusted Root Certification Authorities.