How to remove certificate from Store cleanly

后端 未结 3 766
小蘑菇
小蘑菇 2021-02-13 11:03

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 u

3条回答
  •  -上瘾入骨i
    2021-02-13 11:11

    You can try certmgr.exe. The following command removes a certificate with a cn of 'commoncertname ' from the local user personal\certificates store.

    .\certmgr.exe -del -n commoncertname -c -s -r currentuser my
    

    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:

    Get-ChildItem Cert:\CurrentUser\My | Where-Object {$_.Subject -eq 'CN=certCN'} | Remove-Item
    

提交回复
热议问题