从计算机商店删除证书 [英] Delete certificate from Computer Store
问题描述
我很难获得Powershell来删除意外安装到我们所有Windows 7计算机上的证书到计算机商店。
I am having difficulty getting powershell to delete a certificate that was accidentally installed to all our Windows 7 machines to the Computer Store.
例如,我包括一个证书安装位置的屏幕截图(这不是实际的证书)。我们有几百台机器,所以我们希望尽可能自动地做到这一点。
As an example I have included a screen shot of where the certificate is installed (this is not the actual certificate). We have a few hundred machines so we would like to do this as automatic as possible.
如果有人可以提供一种通过序列号或指纹删除证书的方法,很好。
If someone could provide a way to delete the certificate by Serial Number or Thumbprint that would be great.
推荐答案
您可以使用 Cert:
-PSDrive和 Get-ChildItem
和 Remove -商品
。例如:
You can use the Cert:
-PSDrive with Get-ChildItem
and Remove-Item
. Ex:
#Delete by thumbprint
Get-ChildItem Cert:\LocalMachine\My\D20159B7772E33A6A33E436C938C6FE764367396 | Remove-Item
#Delete by subject/serialnumber/issuer/whatever
Get-ChildItem Cert:\LocalMachine\My |
Where-Object { $_.Subject -match 'Frode F' } |
Remove-Item
这篇关于从计算机商店删除证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!