Getting local machine and all user certificates with PowerShell

核能气质少年 提交于 2019-12-03 18:00:32

问题


I can get all certificates in local machine and current user stores by doing

Get-ChildItem Cert: -Recurse |
    ? { $_ -is [System.Security.Cryptography.X509Certificates.X509Certificate2] }

How do I do the same thing for all users on the local machine?
(I need to find a certain certificate and all I know is a serial number and that it is definitely installed in some store)


回答1:


User certificates are stored in the user's registry hive, so you'd need to either log in as the particular user or load his hive into the registry and manually decode the certificate BLOBs. I'm not aware of other ways to get the certificates of another user.



来源:https://stackoverflow.com/questions/18712066/getting-local-machine-and-all-user-certificates-with-powershell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!