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?
MSDN StoreName Enumeration
$store=new-object System.Security.Cryptography.X509Certificates.X509Store("CA")
# Put in CA, My, root etc.
$store.open("ReadOnly")
$store.Certificates
$store.Certificates.count
You can get them from your local cert drive:
Get-ChildItem Cert:\CurrentUser\CA # user certs
Get-ChildItem Cert:\LocalMachine\CA # machine certs
Get-ChildItem Cert:\LocalMachine\My
This is fun if you have WinRM installed but in a much more standard way to find all certificate it is much better to use something like
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store("\\$server_name\My","LocalMachine")
$store.Open("ReadOnly")
$store.Certificates
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With