Remotely Delete local Computer certificate

Posted on 2011-10-31
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

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    Recently, an awarded photographer, Selina De Maeyer (, completed a photo shoot of a beautiful event ( in An…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now