{"id":551,"date":"2014-10-10T11:59:00","date_gmt":"2014-10-10T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2014\/10\/10\/powertip-use-powershell-to-get-ssl-certificate\/"},"modified":"2014-10-10T11:59:00","modified_gmt":"2014-10-10T11:59:00","slug":"powertip-use-powershell-to-get-ssl-certificate","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-use-powershell-to-get-ssl-certificate\/","title":{"rendered":"PowerTip: Use PowerShell to Get SSL Certificate"},"content":{"rendered":"<p><b style=\"font-size:12px\">Summary<\/b><span style=\"font-size:12px\">: Learn how to use Windows PowerShell to get an SSL certificate from an internal certification authority.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>&nbsp;How can I use Windows PowerShell to get an SSL certificate from an internal certification authority (CA) <br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and import it to my web server&#039;s local certificate store?<\/p>\n<p style=\"margin-left:30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>&nbsp;Use the&nbsp;<b>Get-Certificate<\/b>&nbsp;cmdlet, specify the template, the DNS name, subject, and store location, for example<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(this is a one-line command broken to fit on the webpage):<\/p>\n<p style=\"margin-left:90px\">Get-Certificate -Template WebServer -DnsName &quot;webserver.contoso.com&quot; <br \/>-CertStoreLocation Cert:\\LocalMachine\\My&nbsp; -SubjectName &ldquo;webserver1.contoso.com&rdquo;<\/p>\n<p style=\"margin-left:60px\"><b>Note&nbsp;<\/b>&nbsp;The certificate cannot be marked exportable using this method.<br \/><span style=\"font-size:12px\">Thank you to Microsoft PFE, Jason Walker, for today&rsquo;s PowerTip.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\" alt=\" \" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to use Windows PowerShell to get an SSL certificate from an internal certification authority. &nbsp;How can I use Windows PowerShell to get an SSL certificate from an internal certification authority (CA) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and import it to my web server&#039;s local certificate store? &nbsp;Use the&nbsp;Get-Certificate&nbsp;cmdlet, specify the template, the [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[56,338,356,3,45],"class_list":["post-551","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-guest-blogger","tag-jason-walker","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to use Windows PowerShell to get an SSL certificate from an internal certification authority. &nbsp;How can I use Windows PowerShell to get an SSL certificate from an internal certification authority (CA) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and import it to my web server&#039;s local certificate store? &nbsp;Use the&nbsp;Get-Certificate&nbsp;cmdlet, specify the template, the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=551"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/551\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}