locked
Need help to delete a certficate from personal certificates with "Certutil" RRS feed

  • Question

  • Hi,

    I want to delete a certificate from personal certificate store in my local machine store. I used following command.

    certutil -delstore -enterprise -user My <certificate_name>

    But I got following error.
    CertUtil: -delstore command FAILED: 0x80070002 (WIN32: 2)
    CertUtil: The system cannot find the file specified.

    Can any body pls give a solution? I am working with urgent work.

    Thanks
    Buddhika Priyadarshana


    asa
    Monday, September 29, 2008 11:15 AM

Answers

  • It sounds like simply this certificate is named something else or not in the store you have specified.
    My advice would be to open an mmc and go to certificate management to check which store and its name (may as well delete it while you are there), if you can't due to running server core, you can change the target of the mmc from a client ie your workstation. You just need to have the resource kit installed on your workstation.

    "Put me here and I am all yours, not for the money and not for the appluase", Melanie Safka
    • Marked as answer by Joson Zhou Monday, October 6, 2008 2:08 AM
    • Edited by Changlinn Tuesday, May 12, 2009 1:34 AM
    Monday, September 29, 2008 12:07 PM
  • What did you use for <certificate_name>.
    Try using the serial number of the certificate "00 00 00 00 00 00 00 00 01"
    Brian
    • Marked as answer by Joson Zhou Monday, October 6, 2008 2:08 AM
    Tuesday, September 30, 2008 10:56 AM

All replies

  • It sounds like simply this certificate is named something else or not in the store you have specified.
    My advice would be to open an mmc and go to certificate management to check which store and its name (may as well delete it while you are there), if you can't due to running server core, you can change the target of the mmc from a client ie your workstation. You just need to have the resource kit installed on your workstation.

    "Put me here and I am all yours, not for the money and not for the appluase", Melanie Safka
    • Marked as answer by Joson Zhou Monday, October 6, 2008 2:08 AM
    • Edited by Changlinn Tuesday, May 12, 2009 1:34 AM
    Monday, September 29, 2008 12:07 PM
  • What did you use for <certificate_name>.
    Try using the serial number of the certificate "00 00 00 00 00 00 00 00 01"
    Brian
    • Marked as answer by Joson Zhou Monday, October 6, 2008 2:08 AM
    Tuesday, September 30, 2008 10:56 AM
  • It is not an enterprise store use the command

    certutil -delstore MY <certificatename>

    Hope that helps.

    • Proposed as answer by Ridge111 Monday, December 14, 2015 10:15 PM
    Wednesday, June 23, 2010 8:15 PM
  • It is not an enterprise store use the command

    certutil -delstore MY <certificatename>

    Hope that helps.

    Thanks, this is exactly it.  Gotta love undocumented switches.  You can also use

    certutil -store MY

    to list the certs in the Personal store so you can find the name of what you want to delete.

    Monday, December 14, 2015 10:19 PM
  • When all else fails, this worked for me:

    https://wordpress.com/read/blogs/64934514/posts/3

    Thursday, December 1, 2016 2:13 PM