第一種 (Password 明碼)
Set-StrictMode -Version Latest
[string] $strPW = 'password'
[string] $strPFX = 'C:\Cert\www.contoso.com.pfx'
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import($strPFX,$strPW,[System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]"DefaultKeySet")
$cert.Thumbprint
