Removing Certificate Plus Private Key

by Aug 15, 2013

Starting with PowerShell 3.0, the certificate provider has become a lot more powerful. It can now easily delete certificates plus their associated private key (which you should only try if you clearly understand what it means to get rid of a digital certificate).

This line gets you all personal certificates with 'test' in their subjects:

And here's the line that deletes all of these certificates including their private keys:

Note that the dynamic parameters like -DeleteKey might not show up right away. You may have to first switch to the cert: drive like this:

Twitter This Tip! ReTweet this Tip!