Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Call as .\thumbprint.ps1 $PWD\example_cert
- $CertificatePath = $Args[0]
- $certificateObject = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
- $certificateObject.Import($CertificatePath, $sSecStrPassword, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::DefaultKeySet)
- $expectedThumbprint = $certificateObject.Thumbprint
- echo $expectedThumbprint
- # To verify a cert's thumbprint is imported:
- # Get-ChildItem -Recurse Cert:\\LocalMachine | findstr -i <thumbprint>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement