如何以编程方式删除受信任的根证书颁发机构中的证书?

我需要能够从组织中的每台PC上删除特定证书。 是的,我可以坐到座位,但我要到星期四才能把它拉下来,我没有人力去坐下。

是否有一种使用C#的程序化方法?

我不认为你需要编写任何C# – 看看certmgr.exe /del

如果你真的想在今天写一些C#来做这个,那么看看X509Store.Remove

在MSDN中有一个例子( 点击这里 )

我认为这个例子是不言自明的,但这里是摘录:

 using System; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.IO; public class X509store2 { public static void Main (string[] args) { //Create new X509 store called teststore from the local certificate store. X509Store store = new X509Store ("ROOT", StoreLocation.CurrentUser); store.Open (OpenFlags.ReadWrite); ... store.Remove (certificate1); store.RemoveRange (collection); ... //Close the store. store.Close (); } }