I want to delete all my PERSONAL certificates from certmgr.msc from command line , is this possible?
I tried some code but it doesnt work
I can list my certificates by runing this in powershell
dir cert:\\CurrentUser\My\
I tried this but is not working
PS C:\Users\A\Desktop> rm cert:\\CurrentUser\My\0B909E44056411513E2B220007541AF4822B5C10
Remove-Item : Provider execution stopped because the provider does not support this operation.
At line:1 char:3
+ rm <<<< cert:\\CurrentUser\My\0B909E44056411513E2B220007541AF4822B5C10
+ CategoryInfo : NotImplemented: (:) [Remove-Item], PSNotSupportedException
+ FullyQualifiedErrorId : NotSupported,Microsoft.PowerShell.Commands.RemoveItemCommand
Best Answer
What OS and PowerShell version are you on? Your
rm cert:\\CurrentUser\My\thumbprint
example works on my machine.The other way I would do it is via the pipeline. But ultimately, it's the same thing using
Remove-Item
.The
Remove-Item
documentation indicates the ability to use it against certificates was added in PowerShell version 3.0.