问题
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