How to Find Certificates by their Thumbprint

Let's say you know the thumbprint of a certificate and want to see if it's installed. You can go through and check the properties of each certificate, but it's kind of a pain. You can do it much easier from Powershell. 

powershell cert 2 935553088

Open a Powershell prompt and type in 

cd CERT:\\

Then type in "ls" and you'll see your CurrentUser and LocalMachine Stores. From here you can search the entire store with the following command:

Get-ChildItem -Path 'XXXXXXXXXXXXXXXX' - Recurse

(Where XXX is your thumbprint)

This will show you all the certs installed with that thumbprint:

powershell cert 1335854400

For more detail you can use Format-List: 

Get-ChildItem -Path 'XXXXXXXXXXXXXXXX' - Recurse | Format-List -Property *

Also, You can also view thumbprints of all your certificates by listing them here. For instance to show all your local certs:

ls .\\CurrentUser\My

This is just one of many ways Powershell can make your life easier. While the MMC snapin works well, it's usually faster just to do what you can from the Powershell prompt. 

Are you an IIS Administrator? Do you want to be? Check out my new  IIS Administration Fundamentals course at Pluralsight! - J
This article is part of the GWB Archives. Original Author: Jeremy Morgan

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.