Hi,
Based on my research,when we remove the expired certificates ,Certutil -deleterow expired date cert,t
he only problem with this approach is that certutil.exe will only delete about 2,000 - 3,000 records at a time before failing due to exhaustion of the version store. Luckily, we can wrap this command in a simple batch file that runs the command over and over until all the designated records have been removed.
More details for your reference:
https://learn.microsoft.com/en-us/archive/blogs/askds/the-case-of-the-enormous-ca-database
And you can find Certificates that are About to Expire using PowerShell command before and after running the delete command to confirm if the expired certificates changed.
https://devblogs.microsoft.com/scripting/use-powershell-to-find-certificates-that-are-about-to-expire/
Best Regards,