Solved

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

Posted on 2011-09-20
6
363 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
Comment Utility
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
Comment Utility
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
Comment Utility
That would probably be easier if you were able to!
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 500 total points
Comment Utility
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
Comment Utility
Brilliant!

Thanks
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
Comment Utility
You're welcome :)

Krzysztof
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
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 to another domain controller. Log onto the new domain controller with a user account t…
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 …

771 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

11 Experts available now in Live!

Get 1:1 Help Now