- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
05-31-2022 05:49 AM
05-05-2025 01:08 PM
Not sure which version you are using, but any supported version of Certificate Manager, Self Hosted has the Recycle Bin feature which can be configured to do exactly what you're looking for: https://docs.venafi.com/Docs/24.1/TopNav/Content/Configuration/PlatformConfig/c-vcc-about-recycle-bin.php
Other than that you'll have to use the API to search for certs which expire in that window and iterate through them deleting them one at a time.
05-05-2025 04:19 PM
As Dan said, you need to search for expired certs and then delete them. To find (expired) certs, the api is https://docs.venafi.com/Docs/currentAPI/#?route=get-/vedsdk/certificates. You will need to provide today's date to ValidToLess and the date from 6 months ago to ValidToGreater. To delete the certificate(s) you can use https://docs.venafi.com/Docs/currentAPI/#?route=delete-/vedsdk/certificates/-guid-.
If you are open to using powershell, you can use the VenafiPS powershell module to do this quite easily:
Find-VdcCertificate -ExpireAfter (get-date).AddMonths(-6) -ExpireBefore (get-date) | Remove-VdcCertificate
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

