You can install certificate into certificate store using Wizard in certmgr.msc (Right click install)? Does anyone knows how to "cleanly" remove all the certificate by either using wizard/Code (pref.) /Script ?
I want to be able to remove everything (that I have installed earlier) from the LocalMachine and/or CurrentUser Store without leaving any residue.
Thanks
Old thread, but I just followed the linked post below using Win 7 and it worked nicely... Uses the Management Console.
Source: http://windowssecrets.com/top-story/certificate-cleanup-for-most-personal-computers/
You can try certmgr.exe. The following command removes a certificate with a cn of 'commoncertname ' from the local user personal\certificates store.
You can find more information about certmgr.exe here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa376553%28v=vs.85%29.aspx
UPDATE
Duh! I can't believe I didn't try this! You can remove certificates with the following:
You could try the
X509Store
and releated classes in the .Net Framework to delete a certificate from the certificate store. The following code example deletes a certificate from the current user's My store:BEGIN EDIT: Based on the comments in the comment section I've updated my answer with a code sample showing how to remove a certificate and all certificates in the chain:
END EDIT
Hope, this helps.