<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>AD CS on /home/martijn</title><link>https://www.martijnvandijk.net/tags/ad-cs/</link><description>Recent content in AD CS on /home/martijn</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 14 Nov 2022 13:55:00 +0100</lastBuildDate><atom:link href="https://www.martijnvandijk.net/tags/ad-cs/index.xml" rel="self" type="application/rss+xml"/><item><title>Certreq command snippets for AD CS</title><link>https://www.martijnvandijk.net/posts/adcs-certreq-snippets/</link><pubDate>Mon, 14 Nov 2022 13:55:00 +0100</pubDate><guid>https://www.martijnvandijk.net/posts/adcs-certreq-snippets/</guid><description>This is a brief overview of how to issue certificates with certreq commands. It might be of use for someone administrating an ADCS instance.
Issuing a leaf certificate This will create a certificate of the CertTemplateName template.
certreq -submit -attrib &amp;#34;CertificateTemplate:CertTemplateName&amp;#34; .\signing_request.csr Issuing an issuing CA template This assumes that the root CA is not running in enterprise CA mode. This command will create an issuing CA certificate valid for 1 (one) year.</description><content:encoded><![CDATA[<p>This is a brief overview of how to issue certificates with certreq commands. It might be of use for someone administrating an ADCS instance.</p>
<h1 id="issuing-a-leaf-certificate">Issuing a leaf certificate</h1>
<p>This will create a certificate of the CertTemplateName template.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-powershell" data-lang="powershell"><span style="display:flex;"><span>certreq -submit -attrib <span style="color:#e6db74">&#34;CertificateTemplate:CertTemplateName&#34;</span> .\signing_request.csr
</span></span></code></pre></div><h1 id="issuing-an-issuing-ca-template">Issuing an issuing CA template</h1>
<p>This assumes that the root CA is not running in enterprise CA mode. This command will create an issuing CA certificate valid for 1 (one) year.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-powershell" data-lang="powershell"><span style="display:flex;"><span>certreq -attrib <span style="color:#e6db74">&#34;CertificateTemplate:SubCA&#34;</span> -attrib <span style="color:#e6db74">&#34;ValidityPeriod:1&#34;</span> -attrib<span style="color:#e6db74">&#34;ValidityPeriodUnits:Years&#34;</span> .\SSL_CERT_R.csr
</span></span></code></pre></div><p>The <code>certreq</code> tool will then output a RequestId. Look this up in <code>certsrv.msc</code>, approve it and export the certificate.</p>
]]></content:encoded></item></channel></rss>