Solved

Script to install a .cer

Posted on 2012-04-02
6
1,002 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
LVL 35

Accepted Solution

by:
Joseph Daly earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

734 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