{"id":93,"date":"2006-10-24T12:59:00","date_gmt":"2006-10-24T19:59:00","guid":{"rendered":"http:\/\/www.jasemccarty.com\/blog\/2006\/10\/windows-need-to-seize-roles-during-dr.html"},"modified":"2006-10-24T12:59:00","modified_gmt":"2006-10-24T19:59:00","slug":"windows-need-to-seize-roles-during-dr","status":"publish","type":"post","link":"https:\/\/www.jasemccarty.com\/blog\/windows-need-to-seize-roles-during-dr\/","title":{"rendered":"Windows: Need to Seize Roles during DR?"},"content":{"rendered":"<p>In an environment that needs to come up quickly, I found a little trick that can be helpful.<\/p>\n<p>NTDSUTIL.exe  lets you manage which domain controllers handle which roles in your domain.<\/p>\n<p>According to kb article <a style=\"font-weight: bold;\" href=\"http:\/\/support.microsoft.com\/kb\/243267\">243267<\/a>, you can script this.  So in a DR situation, if you have a virtual DC (in a VM) and you want to have it seize all roles, it can be simple with the following script.<\/p>\n<p>The following script will allow you to seize all roles from a batch file <span style=\"font-size:85%;\">(<a style=\"font-weight: bold;\" href=\"\/scripts\/seizeroles1.txt\">seizeroles1.bat<\/a>)<\/span>:<br \/><span style=\";font-family:courier new;font-size:85%;\"  >**********BEGIN HERE**********<br \/>ntdsutil roles connections &#8220;connect to server %1&#8221; quit &#8220;seize domain naming master&#8221; quit quit<br \/>ntdsutil roles connections &#8220;connect to server %1&#8221; quit &#8220;seize infrastructure master&#8221; quit quit<br \/>ntdsutil roles connections &#8220;connect to server %1&#8221; quit &#8220;seize PDC&#8221; quit quit<br \/>ntdsutil roles connections &#8220;connect to server %1&#8221; quit &#8220;seize RID master&#8221; quit quit<br \/>ntdsutil roles connections &#8220;connect to server %1&#8221; quit &#8220;seize schema master&#8221; quit quit<br \/>***********END HERE***********<\/span><br \/>Save the batch file as seizeroles.bat and call it from a cmd prompt with &#8220;seizeroles.bat servername.domain&#8221;<\/p>\n<p>Additionally, some of this can be abbreviated <span style=\"font-size:85%;\">(<a style=\"font-weight: bold;\" href=\"\/scripts\/seizeroles2.txt\">seizeroles2.bat<\/a>)<\/span>:<br \/><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">**********BEGIN HERE**********<\/span><br \/><span style=\"font-family:courier new;\">ntdsutil r c &#8220;co t s %1&#8221; q &#8220;seize domain naming master&#8221; q q<\/span><br \/><span style=\"font-family:courier new;\">ntdsutil r c &#8220;co t s %1&#8221; q &#8220;seize infrastructure master&#8221; q q<\/span><br \/><span style=\"font-family:courier new;\">ntdsutil r c &#8220;co t s %1&#8221; q &#8220;seize PDC&#8221; q q<\/span><br \/><span style=\"font-family:courier new;\">ntdsutil r c &#8220;co t s %1&#8221; q &#8220;seize RID master&#8221; q q<\/span><br \/><span style=\"font-family:courier new;\">ntdsutil r c &#8220;co t s %1&#8221; q &#8220;seize schema master&#8221; q q<\/span><br \/><span style=\"font-family:courier new;\">***********END HERE***********<\/span><\/span><\/p>\n<p>And if you really want it to shorten up, you can enter a single line to do what you want <span style=\"font-size:85%;\">(<a style=\"font-weight: bold;\" href=\"\/scripts\/seizeroles3.txt\">seizeroles3.bat<\/a>)<\/span>:<br \/><span style=\";font-family:courier new;font-size:85%;\"  >**********BEGIN HERE**********<br \/>ntdsutil r c &#8220;co t s %1&#8221; q &#8220;seize domain naming master&#8221; &#8220;seize infrastructure master&#8221; &#8220;seize PDC&#8221; &#8220;seize RID master&#8221; &#8220;seize schema master&#8221; q q<br \/>***********END HERE***********<\/span><\/p>\n<p>Also I like to add a &#8220;popups off&#8221; or &#8220;p off&#8221; before the r c to keep it from prompting me as to whether I wish to perform this action or not.<\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In an environment that needs to come up quickly, I found a little trick that can be helpful. NTDSUTIL.exe lets you manage which domain controllers &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-windows"],"_links":{"self":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":0,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}