I am trying to use a script to remove smart card certificates in the personal certificate store. I am aware of how to do this manually through internet options however I would like to use a script to remove the certificates from the store automatically on logoff (I know how to run logoff scripts).
I found an answer from Ƭᴇcʜιᴇ007, and this script works, but not for all current and newer certificates from 2024 (this post is from 2015). I have attempted to understand how these certs work but it eludes me.
How can this script from Ƭᴇcʜιᴇ007 be modified to make this script work with newer certificates?