Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Move a Domain Controller to a New Active Directory SiteContent of Move a Domain Controller to a New Active Directory Site.vbsMD5 Hash: 1AD4C1B13D1D94D59E62811DEB4227BF |
||
' Description: Moves a domain controller from one Active Directory site (strSourceSiteRDN) to another Active Directory site (strTargetSiteRDN).
strSourceSiteRDN = "cn=Default-First-Site-Name" strTargetSiteRDN = "cn=Ga-Atl-Sales" strDcRDN = "cn=atl-dc-01" Set objRootDSE = GetObject("LDAP://RootDSE") strConfigurationNC = objRootDSE.Get("configurationNamingContext") strDcPath = "LDAP://" & strDcRDN & ",cn=Servers," & strSourceSiteRDN & _ ",cn=Sites," & strConfigurationNC strTargetSitePath = "LDAP://cn=Servers," & strTargetSiteRDN & _ ",cn=Sites," & strConfigurationNC Set objTargetSite = GetObject(strTargetSitePath) objTargetSite.MoveHere strDcPath, strDcRDN | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |