Anyone attempted/succeeded in writing a template to check Certificate Expiration on Windows Server using keytool?
Nope.
Could you use the certreq option and right a wrapper for it, in PowerShell?
From a powershell prompt on a server with keytool installed, if you were to retrieve the certificate details using:
$certdetails = keytool -certreq <with whatever options you'd use>
You can then examine the data you get back, using:
Write-Host $certdetails
Write-Host $certdetails | Get-Member
I'd be surprised if it doesn't detail the expiration value as a named source, i.e. $certdetails.expirationdate (or similar).
If you need a hand, just ask.
Nope dont need to ask. Unsupported by solarwinds. Have you tested this by the way?
What would be more realistic is to follow supported solarwinds approaches and monitor through trusted root certifications.It would be very unprofessional of me as a solarwinds certified engineer to condone untested and unsubstantiated scripts.
What, you don't write your own PowerShell monitors?
And SolarWinds will offer support on SAM PowerShell monitors, I know, as I have used them for such assistance.
Let me give that a try....Thanks!