Getting Server SSL Cert Expiration Info

Getting Server SSL Cert Expiration Info

am 13.03.2006 17:12:35 von Jul.Genis

Hello,

I am trying to come up with a solution which will help me gather ssl
certificacte expiration date remotelly. So far the only solution that i
caould come up with is running the following command on remote servers:
certmgr.exe /s -r localmachine my >> \\server\share\exp_date.txt

I tried to run it via wmi but cant seem to get it working. If any one
has a better idea please post it.

here is the wmi code

strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")
errReturn = objWMIService.Create _
("cmd.exe /c certmgr.exe /s -r localmachine my >>
\\server\share\exp_date.txt", Null, Null, intProcessID)

Re: Getting Server SSL Cert Expiration Info

am 14.03.2006 07:31:14 von Ken Schaefer

You could use psexec from www.sysinternals.com

Cheers
Ken


wrote in message
news:1142266354.988182.195600@p10g2000cwp.googlegroups.com.. .
: Hello,
:
: I am trying to come up with a solution which will help me gather ssl
: certificacte expiration date remotelly. So far the only solution that i
: caould come up with is running the following command on remote servers:
: certmgr.exe /s -r localmachine my >> \\server\share\exp_date.txt
:
: I tried to run it via wmi but cant seem to get it working. If any one
: has a better idea please post it.
:
: here is the wmi code
:
: strComputer = "."
: Set objWMIService = GetObject _
: ("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")
: errReturn = objWMIService.Create _
: ("cmd.exe /c certmgr.exe /s -r localmachine my >>
: \\server\share\exp_date.txt", Null, Null, intProcessID)
:

Re: Getting Server SSL Cert Expiration Info

am 14.03.2006 16:41:53 von Jul.Genis

unfortunattel remote shells are forbidden where i work so the only
thing i can use is wmi :(.

psexec would have done the job perfectly though

Re: Getting Server SSL Cert Expiration Info

am 15.03.2006 03:26:33 von Ken Schaefer

How is PSExec any different to what you were doing with WMI? Your WMI script
(as posted) seems to be invoking a remote shell via RPC...

Cheers
Ken

wrote in message
news:1142350913.677416.250630@e56g2000cwe.googlegroups.com.. .
: unfortunattel remote shells are forbidden where i work so the only
: thing i can use is wmi :(.
:
: psexec would have done the job perfectly though
:

Re: Getting Server SSL Cert Expiration Info

am 20.03.2006 17:09:57 von Jul.Genis

psexec installs a service(then removes it)