Files
Daniel ModlerandNeil Twigg 1ee8f52829 Certstore: Added cert_match_skip_invalid option
Replaces #4384.

Co-authored-by: Daniel Modler <[email protected]>
Co-authored-by: Neil Twigg <[email protected]>
Signed-off-by: Neil Twigg <[email protected]>
2024-10-25 15:05:12 +01:00

8 lines
429 B
PowerShell

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