get.pme.sh/pnats@v0.0.0-20240304004023-26bb5a137ed0/test/configs/certs/tlsauth/certstore/import-p12-server.ps1 (about)

     1  $fileLocale = $PSScriptRoot + "\server.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