Solved

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

Posted on 2011-09-20
6
379 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
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

Does Powershell have you tied up in knots?

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

This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
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 …

695 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