[ Team LiB ] |
Recipe 4.18 Moving an Object to a Different Domain4.18.1 ProblemYou want to move an object to a different domain. 4.18.2 Solution4.18.2.1 Using a command-line interface> movetree /start /s SourceDC /d TargetDC /sdn SourceDN /ddn TargetDN In the following example, the cn=jsmith object in the amer.rallencorp.com domain will be moved to the emea.rallencorp.com domain. > movetree /start /s dc-amer1 /d dc-emea1[RETURN] /ddn cn=jsmith,cn=users,dc=amer,dc=rallencorp,dc=com[RETURN] /sdn cn=jsmith,cn=users,dc=emea,dc=rallencorp,dc=com[RETURN] 4.18.2.2 Using VBScriptset objObject = GetObject("LDAP://TargetDC/TargetParentDN") objObject.MoveHere "LDAP://SourceDC/SourceDN", vbNullString In the following example, the cn=jsmith object in the amer.rallencorp.com domain will be moved to the emea.rallencorp.com domain. set objObject = GetObject( _ "LDAP://dc-amer1/cn=users,dc=amer,dc=rallencorp,dc=com") objObject.MoveHere _ "LDAP://dc-emea1/cn=jsmith,cn=users,dc=emea,dc=rallencorp,dc=com", _ vbNullString 4.18.3 DiscussionYou can move objects between domains assuming you follow a few guidelines:
4.18.4 See AlsoRecipe 4.3 for more on LDAP controls, MS KB 238394 (How to Use the MoveTree Utility to Move Objects Between Domains in a Single Forest), and MSDN: IADsContainer::MoveHere |
[ Team LiB ] |