Get List of Certificates in Windows PowerShell

Q

How to get a list of certificate in a certificate store in Windows PowerShell?

✍: FYIcenter.com

A

The easiest way to get a list of certificates in a certificate store with Windows PowerShell is to use the "dir" command with the "Cert:" path name.

The following example lists all certificates in the "Disallowed" certificate store:

PS C:\fyicenter> cd Cert:
PS Cert:\> cd localmachine
PS Cert:\localmachine> cd disallowed
PS Cert:\localmachine\disallowed> dir

    Directory: Microsoft.PowerShell.Security\Certificate::localmachine\disallowed

Thumbprint    Subject
----------    -------
FA6660...E97  CN=Microsoft Enforced Licensing Registration Authority CA (SHA1), O=Micros...
F92BE5...9CB  E=ileti@kktcmerkezbankasi.org, CN=e-islem.kktcmerkezbankasi.org, O=KKTC Me...
F8A54E...D83  E=info@diginotar.nl, CN=DigiNotar Services 1024 CA, O=DigiNotar, C=NL
F5A874...08A  CN=Microsoft Online Svcs BPOS CA2, O=Microsoft Corporation, L=Redmond, S=W...
E9809E...94D  CN=Microsoft Online Svcs BPOS EMEA CA2, O=Microsoft Corporation, L=Redmond...
E95DD8...ED9  CN=Microsoft Online Svcs BPOS APAC CA3, O=Microsoft Corporation, L=Redmond...
E38A2B...238  CN=Microsoft Genuine Windows Phone Public Preview CA01, OU=GFS, O=Microsof...
D8CE8D...C3B  CN=Microsoft Online Svcs BPOS APAC CA2, O=Microsoft Corporation, L=Redmond...
D43153...177  CN=Microsoft Online Svcs BPOS APAC CA1, O=Microsoft Corporation, L=Redmond...
D0BB3E...85E  CN=Microsoft Online Svcs BPOS APAC CA5, O=Microsoft Corporation, L=Redmond...
D018B6...3AD  CN=login.yahoo.com, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation, OU...
CEA586...2BE  CN=login.live.com, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation, OU=...
C69F28...DB1  CN=*.EGO.GOV.TR, OU=EGO BILGI ISLEM, O=EGO, L=ANKARA, S=ANKARA, C=TR
C060ED...78C  E=info@diginotar.nl, CN=DigiNotar Root CA, O=DigiNotar, C=NL
BED412...5CF  CN=Microsoft IPTVe CA, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
B86E79...AC2  CN=DigiNotar Cyber CA, O=DigiNotar, C=NL
B53334...156  CN=DigiNotar PKIoverheid CA Overheid, O=DigiNotar B.V., C=NL
A81706...4F5  CN=Microsoft Online Svcs CA5, O=Microsoft Corporation, L=Redmond, S=Washin...
A7B553...4A6  CN=Microsoft Online Svcs BPOS EMEA CA3, O=Microsoft Corporation, L=Redmond...
A35A8C...9FD  CN=Microsoft Online Svcs BPOS EMEA CA1, O=Microsoft Corporation, L=Redmond...
A221D3...B66  CN=Microsoft Online Svcs CA1, O=Microsoft Corporation, L=Redmond, S=Washin...
A1505D...502  CN=Microsoft Online CA001, O=Microsoft Corporation, L=Redmond, S=Washingto...
9845A4...D15  E=info@diginotar.nl, CN=DigiNotar Cyber CA, O=DigiNotar, C=NL
8E5BD5...0AB  CN=Digisign Server ID - (Enrich), OU=457608-K, O=Digicert Sdn. Bhd., C=MY
8977E8...3A6  CN=Microsoft Online Svcs CA3, O=Microsoft Corporation, L=Redmond, S=Washin...
86E817...844  E=info@diginotar.nl, CN=DigiNotar Root CA, O=DigiNotar, C=NL
838FFD...873  CN=Microsoft Online Svcs BPOS EMEA CA6, O=Microsoft Corporation, L=Redmond...
80962A...4CF  CN=login.yahoo.com, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation, OU...
7D7F44...931  OU=Microsoft Corporation, CN=Microsoft Corporation, L=Redmond, S=Washingto...
7613BF...18B  CN=Microsoft Online Svcs BPOS CA1, OU=Beta, O=Microsoft Corporation, L=Red...
6690C0...E3F  CN=Microsoft Online Svcs CA4, O=Microsoft Corporation, L=Redmond, S=Washin...
643172...F97  CN=mail.google.com, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation, OU...
63FEAE...7D0  CN=login.yahoo.com, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation, OU...
637162...AC6  OU=Software, CN=Microsoft Corporation, L=Washington, S=DC, C=US, OU=Digita...
61793F...51A  CN=global trustee, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation, OU=...
5DE83E...179  CN=DigiNotar PKIoverheid CA Organisatie - G2, O=DigiNotar B.V., C=NL
5D5185...886  CN=Microsoft Online Svcs CA4, O=Microsoft Corporation, L=Redmond, S=Washin...
5CE339...BE2  CN=AC DG Trésor SSL, O=DG Trésor, C=FR
587B59...C92  CN=Microsoft Online Svcs BPOS CA2, OU=Beta, O=Microsoft Corporation, L=Red...
51C324...B74  CN=Digisign Server ID (Enrich), OU=457608-K, O=Digicert Sdn. Bhd., C=MY
4ED8AA...76F  CN=Microsoft Online Svcs BPOS CA2, O=Microsoft Corporation, L=Redmond, S=W...
4DF139...03B  CN=Microsoft Online Svcs CA5, O=Microsoft Corporation, L=Redmond, S=Washin...
4D8547...8E3  CN=*.google.com, O=Google Inc, L=Mountain View, S=California, C=US
471C94...3C9  CN=login.skype.com, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation, OU...
43D9BC...CC3  E=info@diginotar.nl, CN=DigiNotar Root CA G2, O=DigiNotar, C=NL
40AA38...AF4  CN=DigiNotar PKIoverheid CA Overheid en Bedrijven, O=DigiNotar B.V., C=NL
3A8500...C08  CN=Microsoft Enforced Licensing Intermediate PCA, OU=Copyright (c) 1999 Mi...
3A2601...B83  CN="CN=Microsoft Online Svcs BPOS APAC CA4", O=Microsoft Corporation, L=Re...
374D5B...3CE  CN=Microsoft Online Svcs CA3, O=Microsoft Corporation, L=Redmond, S=Washin...
367D4B...4EB  E=info@diginotar.nl, CN=DigiNotar Root CA, O=DigiNotar, C=NL
330D8D...65F  CN=Microsoft Online Svcs BPOS EMEA CA4, O=Microsoft Corporation, L=Redmond...
305F8B...9D6  CN=addons.mozilla.org, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation,...
2B84BF...216  CN=DigiNotar Cyber CA, O=DigiNotar, C=NL
2A83E9...E70  CN=Microsoft Enforced Licensing Intermediate PCA, OU=Copyright (c) 1999 Mi...
23EF33...74E  CN=Microsoft Online Svcs CA1, O=Microsoft Corporation, L=Redmond, S=Washin...
1916A2...616  CN=www.google.com, OU=PlatinumSSL, OU=Hosted by GTI Group Corporation, OU=...
09FF2C...63E  CN=Microsoft Online Svcs CA6, O=Microsoft Corporation, L=Redmond, S=Washin...
09271D...A17  CN=Microsoft Online Svcs BPOS EMEA CA5, O=Microsoft Corporation, L=Redmond...
08738A...D02  CN=Microsoft Online Svcs BPOS APAC CA6, O=Microsoft Corporation, L=Redmond...

It's interesting to see that there are many Microsoft certificates in the "disallowed" certificate store on a Microsoft system.

 

Get Certificate Details in Windows PowerShell

Certificate Stores under "LocalMachine" in Windows PowerShell

Managing Certificates with Windows PowerShell

⇑⇑ Windows Certificates Tutorials

2016-07-31, 1731👍, 0💬