Loading
How to delete a SSL certificate using certutil
Hello Friends,

 

I need to delete a SSL certificate from Personal & Trusted root certificate store. How can i do this.

 

I have only CN (Common name) of the certificate, i cant use Thumbprint as i dont have it.

 

with "certutil -delstore" command how can i achieve this?

 

Can someone provide a code snippet example.

 

Thanks. Its urgent please help me.

  • Hi there,

     

    Are you really limited to CERTURIL?

     

    PowerShell can do great things, eg finding the Thumbprint with the CN:

     

    Get-ChildItem -path cert: -Recurse | where { $_.Subject -like "CN=*" } | Select Thumbprint

     

    OR:

     

    See this MS doc :

     

    Get-ChildItem -Path cert:\LocalMachine -DnsName *Fabrikam* | Remove-Item

     

    Description

     

    -----------

     

    This command deletes all certificates that have a DNS name that contains "Fabrikam". It uses the DNSName parameter of the Get-ChildItem cmdlet to get the certificates and the Remove-Item cmdlet to delete them.

     

    Kind regards,

     

    Marc
    Expand Post

Loading
How to delete a SSL certificate using certutil