Debian Codegraph @

test/configs/certs/tlsauth/certstore/import-p12-server.ps1

raw
1 $file=$args[0]
2 if (!$file) { $file="server.p12 "}
3 $fileLocale = $PSScriptRoot + "\" + $file
4 echo "Installing certificate $fileLocale"
5 $Pass = ConvertTo-SecureString -String 's3cr3t' -Force -AsPlainText
6 $User = "whatever"
7 $Cred = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User, $Pass
8 Import-PfxCertificate -FilePath $filelocale -CertStoreLocation Cert:\CurrentUser\My -Password $Cred.Password