Skip to Content
Active Directory Cookbook
book

Active Directory Cookbook

by Robbie Allen
September 2003
Intermediate to advanced
624 pages
15h 49m
English
O'Reilly Media, Inc.
Content preview from Active Directory Cookbook

11.16. Moving a Domain Controller to a Different Site

Problem

You want to move a domain controller to a different site. This may be necessary if you promoted the domain controller without first adding its subnet to Active Directory. In that case, the domain controller will be added to the Default-First-Site-Name site.

Solution

Using a graphical user interface

  1. Open the Active Directory Sites and Services snap-in.

  2. In the left pane, expand Sites, expand the site where the server you want to move is contained, and expand the Servers container.

  3. Right-click on the server you want to move and select Move.

  4. Select the site to move the server to.

  5. Click OK.

Using a command-line interface

> dsmove "cn=<ServerName>,cn=servers,cn=<CurrentSite>,[RETURN]
cn=sites,cn=configuration,<ForestRootDN>" -newparent "cn=servers,cn=<NewSite>,[RETURN]
cn=sites,cn=configuration,<ForestRootDN>"

Using VBScript

' This code moves a server to a different site.
' ------ SCRIPT CONFIGURATION ------
' Should contain the common name of the server object
strDC = "<DomainControllerName>" ' e.g. dc02
' Name of servers current site
strCurrentSite = "<CurrentSite>" ' e.g. Default-First-Site-Name
' Name of site you want to move server to
strNewSite = "<NewSite>" ' e.g. Raleigh ' ------ END CONFIGURATION --------- strConfigDN = GetObject("LDAP://RootDSE").Get("configurationNamingContext") strServerDN = "LDAP://cn=" & strDC & ",cn=servers,cn=" & _ strCurrentSite & ",cn=sites," & strConfigDN strNewParentDN = "LDAP://cn=servers,cn=" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Active Directory Administration Cookbook

Active Directory Administration Cookbook

Sander Berkouwer
Active Directory Cookbook, 3rd Edition

Active Directory Cookbook, 3rd Edition

Laura E. Hunter, Robbie Allen
Active Directory Cookbook, 4th Edition

Active Directory Cookbook, 4th Edition

Brian Svidergol, Robbie Allen

Publisher Resources

ISBN: 0596004648Supplemental ContentCatalog PageErrata