
dinesh.dora1.5524922127448633E12 asked a question.
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.
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