[Last Call] Learn how to a build a cloud-first strategyRegister Now


Remotely Delete local Computer certificate

Posted on 2011-10-31
Medium Priority
Last Modified: 2013-08-02
I'm Looking for a way to Delete a expired local computer certificate or delete the certificate by name. Need the script to read from a input file that will have IP's of machines i want to run the script against. I have not been able to find allot of info on building or writing a VB script on certutil. Also if anyone can shed some light on requesting a new cert with a vbs would be nice as well.
Question by:HailArtillery
1 Comment
LVL 10

Accepted Solution

wls3 earned 2000 total points
ID: 37062884
The Invoke-Command is the best cmdlet to run against remove machines.  It allows you to fashion a connection to the machine directly and perform the action you need in the scriptbody as if you were running it directly against that machine.  As soon as the scriptbody executes the connection is closed.  If you need a longer connection use the New-PSSession.  It will stay connected to the remove machine as long as you leave the session open.  With the task you are performing, however, I think writing a function to search the cert store for the specific certificate you want to remove and then pull that one off.  Here is a link to a good example of how to remove certificates:

Removing Certificates from the Certificate Store

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline

831 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