Home All Groups Group Topic Archive Search About

Getting Server SSL Cert Expiration Info

Author
13 Mar 2006 4:12 PM
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)

Author
14 Mar 2006 6:31 AM
Ken Schaefer
You could use psexec from www.sysinternals.com

Cheers
Ken


<Jul.Ge***@gmail.com> wrote in message
Show quoteHide quote
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)
:
Author
14 Mar 2006 3:41 PM
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
Author
15 Mar 2006 2:26 AM
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

<Jul.Ge***@gmail.com> wrote in message
Show quoteHide quote
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
:
Author
20 Mar 2006 4:09 PM
Jul.Genis
psexec installs a service(then removes it)