{"id":1164,"date":"2018-01-06T13:55:51","date_gmt":"2018-01-06T13:55:51","guid":{"rendered":"http:\/\/www.nooblet.org\/blog\/?p=1164"},"modified":"2018-01-06T17:16:09","modified_gmt":"2018-01-06T17:16:09","slug":"renaming-a-domain-controller","status":"publish","type":"post","link":"https:\/\/www.nooblet.org\/blog\/2018\/renaming-a-domain-controller\/","title":{"rendered":"Renaming a Domain Controller"},"content":{"rendered":"<p>You can use netdom to rename any computer, including a domain controller:<\/p>\n<pre class=\"lang:default decode:true \" >netdom computername &lt;old fqdn&gt; \/add:&lt;new fqdn&gt;\r\nnetdom computername &lt;old fqdn&gt; \/makeprimary:&lt;new fqdn&gt;\r\n# reboot\r\nnetdom computername &lt;new fqdn&gt; \/remove:&lt;old fqdn&gt;<\/pre>\n<p>However this will leave the attribute <code>msDS-AdditionalDnsHostName<\/code> with the old name. Check this in ADUC attribute editor (or ADSIEDIT.msc):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.nooblet.org\/blog\/wp-content\/uploads\/2018\/01\/msds-additionaldnshostname.png\" alt=\"\" width=\"462\" height=\"273\" class=\"alignnone size-full wp-image-1166\" srcset=\"https:\/\/www.nooblet.org\/blog\/wp-content\/uploads\/2018\/01\/msds-additionaldnshostname.png 462w, https:\/\/www.nooblet.org\/blog\/wp-content\/uploads\/2018\/01\/msds-additionaldnshostname-300x177.png 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/p>\n<p>Remove the old name and restart.<\/p>\n<p>PS. This fixes not being able to re-use the old name on another computer. You get the error <code>The operation failed because SPN value provided for addition\/modification is not unique forest-wide<\/code>, and you will see the old domain name when you run <code>setspn -l &lt;oldname&gt;<\/code>. Performing the above attribute changes fixes this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use netdom to rename any computer, including a domain controller: netdom computername &lt;old fqdn&gt; \/add:&lt;new fqdn&gt; netdom computername &lt;old fqdn&gt; \/makeprimary:&lt;new fqdn&gt; # reboot netdom computername &lt;new fqdn&gt; \/remove:&lt;old fqdn&gt; However this will leave the attribute msDS-AdditionalDnsHostName with the old name. Check this in ADUC attribute editor (or ADSIEDIT.msc): Remove the old name [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":641,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[56,237,145,236,234],"class_list":["post-1164","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows","tag-domain","tag-rename","tag-server","tag-spn","tag-windows"],"_links":{"self":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/1164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/comments?post=1164"}],"version-history":[{"count":4,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/1164\/revisions"}],"predecessor-version":[{"id":1170,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/1164\/revisions\/1170"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/media\/641"}],"wp:attachment":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/media?parent=1164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/categories?post=1164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/tags?post=1164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}