Code:
Get-ChildItem cert:\LocalMachine\root|Where {$_.NotAfter -lt  (Get-Date).AddDays(60)}|select NotAfter, Subject
Can I block registration of old credential?.-2.png
Can I block registration of old credential?.-3.png

I know how to delete old credential certificate.

But when I reboot, it will be recreated.
Basically, I want to block it.

Can I block invalid credentials?.

certmgr.msc

Microsoft Windows [Version 10.0.19045.1826]

How do I delete powershell admin rights.
Code:
Set-Location Cert:
$expired = Get-ChildItem cert:\* ` -recurse -ExpiringInDays 0
$expired | Remove-Item -DeleteKey