?
Solved

Script to install a .cer

Posted on 2012-04-02
6
Medium Priority
?
1,019 Views
Last Modified: 2012-04-02
Is there a script or a way to remotely install a .cer self signed.  I know you can via a GPO but I have so many I really would rather make this a one time install.
0
Comment
Question by:WellingtonIS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:WebF00L
ID: 37797269
Bat file using the certmgr tool?

http://msdn.microsoft.com/en-us/library/e78byta0(v=vs.80).aspx

//WebFooL Untangle.com Evangelist
0
 
LVL 6

Expert Comment

by:Raquero
ID: 37797292
If you are using multiple internal self-signed certs, consider implementing a Certificate Authority. Properly implemented, clients will automatically trust most certs issued from the CA (code signing certs is one example where this is not the case, they still have to be imported to the local trust store on clients).
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 37797314
I have done this before with a batch file. It is very simple command is below.

certmgr.exe -add C:\test.cer -s -r localMachine root

Certmgr.exe is not installed by default on XP machines so you will need to have it on the machine before you can use it.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 35

Accepted Solution

by:
Joseph Daly earned 2000 total points
ID: 37797324
Below is a small PSexec script that will copy certmgr.exe from a network location to your target machine and then run the certmgr.exe tool. Downlaod PStools and run this BAT file from within that folder.


@echo off
set /p var= Enter Computer Name:
set /p var2= Enter username:
set /p var3= Enter Password:

psexec -u domain\%var2% -p %var3% \\%var% cmd /c copy "\\uncpath\test.cer" C:\
psexec -u domain\%var2% -p %var3% \\%var% cmd /c copy "\\uncpath\certmgr.exe" C:\

psexec -u domain\%var2% -p %var3% \\%var% cmd /c c:\certmgr.exe -add C:\test.cer -s -r localMachine root


pause
0
 

Author Closing Comment

by:WellingtonIS
ID: 37797459
Thx.  I tweeked a little but it worked.  Much appreciated.
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 37797594
Glad to hear. good luck.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question