Solved

move or re-create groups in other domain in the forest

Posted on 2011-09-20
6
365 Views
Last Modified: 2012-05-12
About 100 groups have been created (not in use yet) in the wrong domain in our forest. I am looking for a way in which to move these groups to the other domain.

I have tried Movetree but cannot get it to work (access denied with Enterprise admins) and dont want to have to put together an ADMT installation.

If there was a way to read all the groups from the OU to file and then import into the other domain then that would be ideal?
0
Comment
Question by:aideb
  • 4
  • 2
6 Comments
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 36566620
The last change I can think of is to use dsmove command. Try with that

dsmove "Distinguished Name of a group" -newparent "Distinguished Name of an OU in another Domain"
i.e

dsmove "cn=mygroup,ou=oldgroups,dc=testenv,dc=local" -newparent "ou=newgoups,dc=europe,dc=testenv,dc=local"

If it won't work then you need unfortunatelly ADMT

Regards,
Krzysztof
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 36566628
and one more thing, if they were not used, it's much more simple to export their names into text file and then create them in a new domain. That is very simple, if you want I would prpare a syntax for you.

Krzysztof
0
 
LVL 2

Author Comment

by:aideb
ID: 36567476
That would probably be easier if you were able to!
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 500 total points
ID: 36571850
OK, let's start :)

1) Log on into a Domain Controller in a domain where those groups are created
2) In command-line type this syntax to export their names to a text file

ldifde -f c:\groups.txt -d "ou=oldlocation,dc=domain,dc=local" -r "(objectClass=Group)" -l "cn,groupType,objectClass" -j c:

i.e.

ldifde -f c:\groups.txt -d "ou=oldlocation,ou=wroc,dc=testenv,dc=local" -r "(objectCategory=Group)" -l "cn,groupType,objectClass" -j c:

3) Copy groups.txt file to a Domain Controller in another domain, where you want to create groups (i.e. to C-Drive)
4) Log on into a DC for that domain where you copied text file
5) Edit a text file in a notepad. Fix dn line pointing to current OU structure in new domain. Press Ctrl+H and in Find what place ou=oldlocation,dc=domain,dc=local" and replace with new value ou=newlocation,dc=domain2,dc=local". Save changes.
6) Open command-line an use this syntax

ldifde -i -f c:\groups.txt

7) On a C-Drive you will have ldifde log, review it, if everything was created properly.
8) Run Active Directory Users and Computers snap-in to check if they really exist :)

Krzysztof
0
 
LVL 2

Author Closing Comment

by:aideb
ID: 36575922
Brilliant!

Thanks
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 36575950
You're welcome :)

Krzysztof
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Resolve DNS query failed errors for Exchange
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now