{"id":329,"date":"2021-05-06T13:22:16","date_gmt":"2021-05-06T11:22:16","guid":{"rendered":"http:\/\/brgeek.com.br\/wordpress\/?p=329"},"modified":"2021-05-06T13:22:17","modified_gmt":"2021-05-06T11:22:17","slug":"how-to-generate-ssl-certificate-status-report","status":"publish","type":"post","link":"http:\/\/brgeek.com.br\/wordpress\/2021\/05\/06\/how-to-generate-ssl-certificate-status-report\/","title":{"rendered":"How to Generate SSL Certificate Status Report"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code class=\"\" data-line=\"\">&lt;#\n.SYNOPSIS\n   Generates an SSL certificate status report for all of the hosts\/ports listed in the\n   Certificates.csv input file.\n\n.DESCRIPTION\n   Generates an SSL certificate status report for all of the hosts\/ports listed in the\n   Certificates.csv input file.\n\n.NOTES\n   Written by Michael Goulart\n\n.EXAMPLE\n   .\\Check-SSLCertStatus.ps1\n\n   Hostname                         SerialNumber                           NotAfter                SANs\n   --------                         ------------                           --------                ----\n   server001.contoso.com      3C00001F5A926069237B47AF33000000001F5A 6\/21\/2019 8:45:16 AM    *.contoso.com \n   server001.contoso2.com     3C000017FAD7D584AC44CB17E00000000017FA 4\/17\/2019 2:48:16 PM    *.contoso2.com \n   server001.contoso3.com     3C0000239B5538BE8555AF297300000000239B 9\/12\/2019 9:52:49 AM    *.contoso3.com \n   ...\n\n.INPUTS\n   None - this script does not accept input from the pipeline; the systems being checked are\n   stored in the Certificates.csv file in directory the script is in.\n\n.OUTPUTS\n   PSObjects with the certificate data for each end point in the input file\n\n#&gt;\n\n\nProcess {\n   $Certs = Import-Csv &quot;$PSScriptRoot\\Certificates.csv&quot;\n   ForEach ($Cert in $Certs) {\n      .\\Get-SSLCertInfo.ps1  $Cert.hostname $Cert.port | select-object State,@{n=&#039;Hostname&#039;; e={$_.computer}} ,SerialNumber,NotAfter, @{n=&#039;SANs&#039;;e={$_.DnsNameList.PunyCode -join &quot; &quot;}}\n   }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":148,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[81,8,12,82,6,83,84],"class_list":["post-329","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-mct","tag-michael-goulart","tag-microsoft","tag-microsoft-certified-trainer","tag-powershell","tag-ssl","tag-ssl-report"],"jetpack_featured_media_url":"http:\/\/brgeek.com.br\/wordpress\/wp-content\/uploads\/2017\/09\/powershell-tips-and-tricks_w_640.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/posts\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":1,"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/posts\/329\/revisions"}],"predecessor-version":[{"id":330,"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/posts\/329\/revisions\/330"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/media\/148"}],"wp:attachment":[{"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/categories?post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/brgeek.com.br\/wordpress\/wp-json\/wp\/v2\/tags?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}