[PowerShell] Let's get the certificate list!

powershell_cert Tips / Knowledge

Hello!This time, I will show you how to get the certificate list with PowerShell.

Certificates often disappear when updating Windows, migrating a system, installing any software, and so on.Obtaining a list when conducting a survey is useful for understanding the current situation.
Also, I think it will be useful for selecting certificates when exporting.

View certificate in GUI

First, let's check using the GUI as a basic method.However, it is troublesome to open them one by one seriously, so I will introduce two methods, one is to use the "search bar" and the other is to start from "Run".

How to check a user's certificate

Windows keyClick and enter Certificate in the search bar.
Then, the "Manage User Certificates" icon will appear in the search results, so click here.

certmgrWill start up, so I will check it from here.It is important that the title bar says "Current User".

* Specify the file name and execute "certmgr.mscYou can also start it by entering "" and pressing "OK".

How to check your computer certificate

As before, click the Windows key and enter Certificate in the search bar.
Now click Manage Computer Certificates.

User Account Control (which will appear unless disabled) will appear, so click "Yes".

Then, "certlm" will start.It's okay if the title bar now says "Local Computer".

* Specify the file name and execute "certlm.mscYou can also start it by entering "" and pressing "OK".

The alt attribute is not specified for the image.File name: image-23.png

Get a list with PowerShell commands

You can see them one by one with the previous method, but it is quite inconvenient if you want to check them all at once or spit them out in the text.

So let's display it all at once with the PoweShell command!

List user certificates in PowerShell

The user's certificate can be output with this command. [Command]> c: \ list.txt etc. to output the list to text and save it, or you can view it with another editor, so it is good to remember.

■ User's certificate
Get-ChildItem -path cert: \ CurrentUser -Recurse

When you actually execute the command, the above screen will appear.
Please note that the display will change depending on the user who is running it.

List computer certificates in PowerShell

This is the certificate version of your computer.
Same as before, but note that this time you will need administrator privileges.

Open the menu with the Windows key + "X" key and press "A" to start PowerShell with administrator privileges.

■ Certificate of local computer
Get-ChildItem -Path cert: \ LocalMachine -Recurse

When you actually execute the command, the above screen will appear.
It is convenient to output this as text as before.


I have introduced the method of obtaining a certificate above.

I don't think there are many opportunities to actually use it in the field, but in my environment, there were cases where evidence was required, such as when the certificate was a balance with other teams.

Skills that allow you to prepare and share quickly are necessary at any stage.
In the future, we will introduce confirmation methods other than certificates, so thank you.

I hope it helps you.

Reference URL

How to get windows certificate list with powershell
Today I tried to find out how to get the windows certificate list with a script. ◆ First, I will introduce how to export the certificate list with GUI normally. ・ Enter mmc in "Search programs and files" and press the Enter key to start mmc. ・ "...


Translate »
I copied the title and URL