cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

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.
Labels (1)
0 Kudos
2 Replies
mduiker
Pilgrim

Re: How to delete a SSL certificate using certutil

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
0 Kudos
mduiker
Pilgrim

Re: How to delete a SSL certificate using certutil

Hi there,

Are you really limited to CERTUTIL? PowerShell can do great things... see:

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/providers/remove-it...
0 Kudos