LaP*_*Phi 4 .net c# powershell
我想从我的系统获得所有证书.所以我使用了System.Security.Cryptography.X509Certificates class.
当我删除()之后X509Store我获得了与我输入相同的结果"My"
查看所有证书的正确成员名称是什么?有可能的?
$store=new-object System.Security.Cryptography.X509Certificates.X509Store("CA")
# Put in CA, My, root etc.
$store.open("ReadOnly")
$store.Certificates
$store.Certificates.count
Run Code Online (Sandbox Code Playgroud)
您可以从当地的证书驱动器获取它们:
Get-ChildItem Cert:\CurrentUser\CA # user certs
Get-ChildItem Cert:\LocalMachine\CA # machine certs
Run Code Online (Sandbox Code Playgroud)