I have a digital certificate (Certificate Revocation List -CRL) is updated automatically every day.
Seated documents:
\\ sherefoleder \ certificate \ certificate.crl
I am looking for a script to do a test every day the date of the digital certificate are of the same day
script check Certificate Revocation List -CRL time update
September 8th, 2015 1:32am
You can use the LastWriteTime property of the CRL and compare that value against the current date.
You can reference the below example .
FYI, my CRL is on the desktop. In your case, it would be
Get-Item \\ sherefoleder \ certificate \ certificate.crl
if(((Get-Item .\Desktop\LatestCRL.crl).LastWriteTime).ToShortDateString() -eq ((Get-Date).ToShortDateString())) { Write-Host "Same day." } else { Write-Host "Different day." }
- Edited by mukesh-kumar 22 hours 27 minutes ago
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2015 4:32am
You can use the LastWriteTime property of the CRL and compare that value against the current date.
You can reference the below example .
FYI, my CRL is on the desktop. In your case, it would be
Get-Item \\ sherefoleder \ certificate \ certificate.crl
if(((Get-Item .\Desktop\LatestCRL.crl).LastWriteTime).ToShortDateString() -eq ((Get-Date).ToShortDateString())) { Write-Host "Same day." } else { Write-Host "Different day." }
- Edited by mukesh-kumar Tuesday, September 08, 2015 8:41 AM
September 8th, 2015 8:31am