使用 PowerShell 获取本地计算机和所有用户证书 [英] Getting local machine and all user certificates with PowerShell

查看:130
本文介绍了使用 PowerShell 获取本地计算机和所有用户证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以通过执行

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)

推荐答案

用户证书存储在用户的注册表配置单元中,因此您需要以特定用户身份登录或将其配置单元加载到注册表中并手动解码证书 BLOB.我不知道其他获取其他用户证书的方法.

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.

这篇关于使用 PowerShell 获取本地计算机和所有用户证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆