Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get thumbprint of a certificate

Tags:

People also ask

How do I find the thumbprint of a certificate?

Go to Tools > Internet Options. Click Content tab > Certificates. In the Certificates window, click on the tab for the certificate you want to examine (Personal, Other People, Intermediate Certification Authorities, Trusted Root Certification Authorities) Locate the certificate or root in the list.

What is the thumbprint of a certificate?

A certificate thumbprint is a hash of a certificate, computed over all certificate data and its signature. Thumbprints are used as unique identifiers for certificates, in applications when making trust decisions, in configuration files, and displayed in interfaces.

How do I print a thumbprint certificate in PowerShell?

To get the certificate thumbprint using PowerShell is very much easy. We just need to retrieve the path where certificates reside and the default property that is shown on the console will include the certificate thumbprint. For example, we are going to retrieve the certificate from the personal store.


I want to store the thumbprint of a certificate in a variable like this:

$thumbprint = 0F273F77B77E8F60A8B5B7AACD032FFECEF4776D

But my command output is:

Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Subject -match "XXXXX"}

Thumbprint                                Subject 
----------                                ------- 
0F273F77B77E8F60A8B5B7AACD032FFECEF4776D  CN=XXXXXXX, OU=YYYYYYY 

I need to remove everything but the thumbprint of that output

Any idea?