Solved

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

Posted on 2011-09-20
6
372 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
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 …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

713 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