github.com/nats-io/nats-server/v2@v2.11.0-preview.2/test/configs/certs/tlsauth/certstore/import-p12-client.ps1 (about) 1 $fileLocale = $PSScriptRoot + "\client.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