{"id":2214,"date":"2020-08-17T17:56:44","date_gmt":"2020-08-18T00:56:44","guid":{"rendered":"https:\/\/www.matthewschacherbauer.com\/wp\/?page_id=2214"},"modified":"2020-08-17T18:05:58","modified_gmt":"2020-08-18T01:05:58","slug":"adcs-command-line-reference","status":"publish","type":"page","link":"https:\/\/www.matthewschacherbauer.com\/wp\/guides\/adcs-command-line-reference\/","title":{"rendered":"ADCS Command Line Reference"},"content":{"rendered":"<p>Command line reference for Active Directory Certificate Services<\/p>\n<h2>Enroll a certificate for the local machine by command line<\/h2>\n<pre>certreq -enroll -machine -q TemplateName<\/pre>\n<h3>Example<\/h3>\n<pre>certreq -enroll -machine -q WS-RSA-Computer<\/pre>\n<h2>Enroll a certificate remotely against an Issuing Enterprise Certificate Authority<\/h2>\n<pre>CERTREQ.EXE -attrib \"CertificateTemplate:TemplateName\" -config \"CAFQDN\\CA FriendlyName\" -submit \"C:\\path\\to\\certificate.csr\" \"C:\\path\\to\\issued.cer\" \"C:\\path\\to\\issued.p7b\" \"C:\\path\\to\\issued.rsp\"<\/pre>\n<h3>Example<\/h3>\n<pre>CERTREQ.EXE -attrib \"CertificateTemplate:WS-RSA-Computer\" -config \"WSNOCCA10.lan.wolfspirit.net\\WolfSpirit.Net RSA SHA256 Issuing CA 10\" -submit \"C:\\path\\to\\certificate.csr\" \"C:\\path\\to\\issued.cer\" \"C:\\path\\to\\issued.p7b\" \"C:\\path\\to\\issued.rsp\"<\/pre>\n<h2>Revoke a certificate remotely against an Issuing Enterprise Certificate Authority<\/h2>\n<pre>CERTUTIL.EXE -config \"CAFQDN\\CA FriendlyName\" -revoke serialnumber reason<\/pre>\n<p>Revocation reason codes<br \/>\nNote that all revocation operations are irreversible except when code 6 is utilized.<\/p>\n<div>\n<pre>0: CRL_REASON_UNSPECIFIED\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-- Unspecified (default)\r\n1: CRL_REASON_KEY_COMPROMISE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-- Key Compromise\r\n2: CRL_REASON_CA_COMPROMISE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-- CA Compromise\r\n3: CRL_REASON_AFFILIATION_CHANGED\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-- Affiliation Changed\r\n4: CRL_REASON_SUPERSEDED\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-- Superseded\r\n5: CRL_REASON_CESSATION_OF_OPERATION\u00a0\u00a0\u00a0\u00a0-- Cessation of Operation\r\n6: CRL_REASON_CERTIFICATE_HOLD\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-- Certificate Hold<\/pre>\n<\/div>\n<h3>Example<\/h3>\n<pre>CERTUTIL.EXE -config \"WSNOCCA10.lan.wolfspirit.net\\WolfSpirit.Net RSA SHA256 Issuing CA 10\" -revoke 4200000abcd123432330 4<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Command line reference for Active Directory Certificate Services Enroll a certificate for the local machine by command line certreq -enroll -machine -q TemplateName Example certreq -enroll -machine -q WS-RSA-Computer Enroll a certificate remotely against an Issuing Enterprise Certificate Authority CERTREQ.EXE &hellip; <a href=\"https:\/\/www.matthewschacherbauer.com\/wp\/guides\/adcs-command-line-reference\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1177,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2214","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ADCS Command Line Reference | Matthew Schacherbauer.com<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/guides\\\/adcs-command-line-reference\\\/\",\"url\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/guides\\\/adcs-command-line-reference\\\/\",\"name\":\"ADCS Command Line Reference | Matthew Schacherbauer.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/#website\"},\"datePublished\":\"2020-08-18T00:56:44+00:00\",\"dateModified\":\"2020-08-18T01:05:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/guides\\\/adcs-command-line-reference\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/guides\\\/adcs-command-line-reference\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/guides\\\/adcs-command-line-reference\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Guides\",\"item\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/guides\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"ADCS Command Line Reference\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/#website\",\"url\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/\",\"name\":\"Matthew Schacherbauer.com\",\"description\":\"Personal Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/#\\\/schema\\\/person\\\/554130541ee604b2233ab51197a7e693\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/#\\\/schema\\\/person\\\/554130541ee604b2233ab51197a7e693\",\"name\":\"Matthew Schacherbauer\",\"logo\":{\"@id\":\"https:\\\/\\\/www.matthewschacherbauer.com\\\/wp\\\/#\\\/schema\\\/person\\\/image\\\/\"},\"sameAs\":[\"http:\\\/\\\/www.matthewschacherbauer.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ADCS Command Line Reference | Matthew Schacherbauer.com","robots":{"index":"noindex","follow":"follow"},"twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.matthewschacherbauer.com\/wp\/guides\/adcs-command-line-reference\/","url":"https:\/\/www.matthewschacherbauer.com\/wp\/guides\/adcs-command-line-reference\/","name":"ADCS Command Line Reference | Matthew Schacherbauer.com","isPartOf":{"@id":"https:\/\/www.matthewschacherbauer.com\/wp\/#website"},"datePublished":"2020-08-18T00:56:44+00:00","dateModified":"2020-08-18T01:05:58+00:00","breadcrumb":{"@id":"https:\/\/www.matthewschacherbauer.com\/wp\/guides\/adcs-command-line-reference\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.matthewschacherbauer.com\/wp\/guides\/adcs-command-line-reference\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.matthewschacherbauer.com\/wp\/guides\/adcs-command-line-reference\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.matthewschacherbauer.com\/wp\/"},{"@type":"ListItem","position":2,"name":"Guides","item":"https:\/\/www.matthewschacherbauer.com\/wp\/guides\/"},{"@type":"ListItem","position":3,"name":"ADCS Command Line Reference"}]},{"@type":"WebSite","@id":"https:\/\/www.matthewschacherbauer.com\/wp\/#website","url":"https:\/\/www.matthewschacherbauer.com\/wp\/","name":"Matthew Schacherbauer.com","description":"Personal Blog","publisher":{"@id":"https:\/\/www.matthewschacherbauer.com\/wp\/#\/schema\/person\/554130541ee604b2233ab51197a7e693"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.matthewschacherbauer.com\/wp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.matthewschacherbauer.com\/wp\/#\/schema\/person\/554130541ee604b2233ab51197a7e693","name":"Matthew Schacherbauer","logo":{"@id":"https:\/\/www.matthewschacherbauer.com\/wp\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.matthewschacherbauer.com"]}]}},"_links":{"self":[{"href":"https:\/\/www.matthewschacherbauer.com\/wp\/wp-json\/wp\/v2\/pages\/2214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.matthewschacherbauer.com\/wp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.matthewschacherbauer.com\/wp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.matthewschacherbauer.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.matthewschacherbauer.com\/wp\/wp-json\/wp\/v2\/comments?post=2214"}],"version-history":[{"count":0,"href":"https:\/\/www.matthewschacherbauer.com\/wp\/wp-json\/wp\/v2\/pages\/2214\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.matthewschacherbauer.com\/wp\/wp-json\/wp\/v2\/pages\/1177"}],"wp:attachment":[{"href":"https:\/\/www.matthewschacherbauer.com\/wp\/wp-json\/wp\/v2\/media?parent=2214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}