Question:
I want to get all certificates from my system.
So I used the System.Security.Cryptography.X509Certificates class.
When I remove the ()
after the X509Store
I getting the same results like I entered "My"
What is the right membername to see all certificates? It is possible?
1 2 3 4 5 6 |
$store=new-object System.Security.Cryptography.X509Certificates.X509Store("CA") # Put in CA, My, root etc. $store.open("ReadOnly") $store.Certificates $store.Certificates.count |
Answer:
You can get them from your local cert drive:
1 2 3 4 |
Get-ChildItem Cert:\CurrentUser\CA # user certs Get-ChildItem Cert:\LocalMachine\CA # machine certs |