Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 9

SAM Template to check certificate expiration on Windows Server thru keytool?

Anyone attempted/succeeded in writing a template to check Certificate Expiration on Windows Server using keytool?

Labels (1)
0 Kudos
10 Replies
Level 13


0 Kudos

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.

0 Kudos

Let me give that a try....Thanks!

0 Kudos

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.

0 Kudos

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.

0 Kudos

Im going to take it by your silence that you have not tested your script and keytool is not supported by solarwinds. I would be very careful about supplying unsubstantiated information to unsuspecting individuals as this could damage their systems. It was a similar situation with your confusion on the other thread about the world map question when you had the wrong feature altogether. You seem to be a bit of an opportunistic individual. I however never post scripts of any type without fully testing them on my own environment as i would hate for someone to have their systems damaged. I have also passed solarwinds new npm and sam exams, have you completed the same?

Here is a link to my profile to view my certs if you are in any doubt. If you need any assistance please dont hesitate to let me know and i will be happy to help you in what is best practice or not.

0 Kudos

Woooh matey, calm down, I did not mean to offend or start a flame war.

My silence, was only due to me working - writing PowerShell monitors to extract the DNS request being loaded upon one of our struggling AD boxes.

Look you're SCP, yet your not encouraging people to use PowerShell, fair enough.

I am too and I will: Create a Windows PowerShell Script monitor - SolarWinds Worldwide, LLC. Help and Support

0 Kudos

I am calm, im just blunt. You just came across as a bit wide on your assertions and im direct, to the point. I dont get angry or upset, i just get to the point. I like you, your funny.

0 Kudos

BTW, solarwinds dont provide any support for custom scripting. I would love an answer to my question, have you tested your script because i test mine all the time?

0 Kudos

I do but not for unsupported products, now have you tested the script?

0 Kudos