OnMyWay Posted November 21, 2021 Share Posted November 21, 2021 Hi, I need help with code to delete expired certificates in windows xp, and windows 7. Due to the global expiration of let's encrypt in 2021 old computers that have not been updated will not be able to access the internet. I found the command to import the new certificate, but not to delete the expired certificate! Link to comment Share on other sites More sharing options...
Subz Posted November 21, 2021 Share Posted November 21, 2021 I've always used CertUtil to add/update/remove certificates. Earthshine and mLipok 2 Link to comment Share on other sites More sharing options...
Solution rudi Posted November 24, 2021 Solution Share Posted November 24, 2021 This is a task I would solve using powershell: within an administrative powershell first list all expired certificates and check, if you will be fine to delte them all: gci cert: -r |?{($($_.notafter) -lt $(get-date)) -and ($_.psiscontainer -eq $False)} | sort notafter -desc | ft notafter,subject then delete them: (to do so "run as Admin" is required) gci cert: -r |?{($($_.notafter) -lt $(get-date)) -and ($_.psiscontainer -eq $False)} | sort notafter -desc | remove-item -ea si Regards, Rudi. OnMyWay 1 Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now