Re: certutil to verify the presence of a cert on multiple machines?

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 19:24:41 +0200

Deji Akomolafe wrote:

> If you know how to use psexec, you could do something like:
>
> for /F %%a in (Computerlist.txt) do psexec \\%%a cmd /k
> certutil -verifystore CA 7f55c51d00030000001e
Hi

Note that when not using the switch "-c", certutil.exe must be in the
system path on the remote systems.

Also, later versions of psexec.exe can take the computer names from a
text file (using "@<some file>).

To avoid needing to close each command prompt in the script above,
just redirect the output to a result file.

Something like this should work from a command prompt or batch file:

psexec.exe @Computerlist.txt certutil.exe -verifystore CA
  7f55c51d00030000001e >result.txt

(put the above on 1 line)

If certutil.exe does not exist in system path on the remote servers,
you will need to do like this:

psexec.exe @Computerlist.txt -c certutil.exe -verifystore CA
  7f55c51d00030000001e >result.txt

If you run the above from Start\Run, you need to add "cmd.exe /k "
at the front to support the redirection to result.txt

cmd.exe /c psexec.exe @Computerlist.txt -c certutil.exe -verifystore
  CA 7f55c51d00030000001e >result.txt

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


Relevant Pages

  • Re: certutil to verify the presence of a cert on multiple machines?
    ... system path on the remote systems. ... just redirect the output to a result file. ... If certutil.exe does not exist in system path on the remote servers, ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.platformsdk.security)
  • Re: certutil to verify the presence of a cert on multiple machines?
    ... system path on the remote systems. ... just redirect the output to a result file. ... If certutil.exe does not exist in system path on the remote servers, ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.wsh)
  • Re: Length limitation of Path Environment Variable?
    ... I found that when we tried to append some path to user path variable to some our workstations. ... the user path variable can append to system path again. ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx. ...
    (microsoft.public.win2000.general)
  • Re: convert FAT32 to NTFS problem?
    ... read-only operations before jumping in making changes to remote systems (like ... converting the file system to NTFS). ... Scripting is powerful - but can also be dangerous. ...
    (microsoft.public.scripting.vbscript)
  • Re: Environment variable for "System PATH"
    ... Prabh wrote: ... > What's the environment variable for the System PATH on XP. ... user path, so if you only see the user part, you have a problem. ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.general)