Obtaining SSL Certs in Server store

Welcome Forums General PowerShell Q&A Obtaining SSL Certs in Server store

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years, 2 months ago.

  • Author
  • #5793

    Points: 0
    Rank: Member

    by rambog at 2013-04-10 13:28:53

    I am looking for SSL Certificates that are contained on a remote server. From looking around (web and this site), I would issue the following commands:
    $store=new-object system.security.cryptography.x509certificates.x509store("\\servername\Root","LocalMachine")

    It gives me a ton of cerficates but I am only looking for the SSL Certificates that the web site employs. It looks like the above gives me all the certs on a machine where all I am looking for what is under the "Personal" store (when views with the mmc and Certificates snap-in). I look at the properties for both $store and $store.certificates by piping it over to get-member and it does not seem like I can select only cerficates contained under "Personal". I have tried substituting "\\servername\root\Personal" for the above "\\servername\Root". Any ideas on how I obtain just the certs that the SSL web site uses?

    by rambog at 2013-04-10 13:40:14

    Just found the answer, replace the first line with:
    $store=new-object system.security.cryptography.x509certificates.x509store("\\servername\My","LocalMachine")

The topic ‘Obtaining SSL Certs in Server store’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort