github.com/nats-io/nats-server/v2@v2.11.0-preview.2/test/configs/certs/tlsauth/certstore/import-p12-ca.ps1 (about)

     1  $fileLocale = $PSScriptRoot + "\ca.p12"
     2  $Pass = ConvertTo-SecureString -String 's3cr3t' -Force -AsPlainText
     3  $User = "whatever"
     4  $Cred = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User, $Pass
     5  Import-PfxCertificate -FilePath $filelocale -CertStoreLocation Cert:\CurrentUser\My -Password $Cred.Password
     6  #Import-PfxCertificate -FilePath $filelocale -CertStoreLocation Cert:\LocalMachine\Root -Password $Cred.Password
     7  # TODO?  Move to trusted enterprise?  Requires some fingerprint parsing.