Solved

script export+import group and user from forest A to Forest B

Posted on 2014-04-17
5
1,686 Views
Last Modified: 2014-05-13
hello,

i need to export user and group from my Active directory production forest to my lab forest.

AD 2008 R2.

i need to export all group  and user from specific organisationnel unit.

i need to keep the member of group from forest a to forest b.

thanks
0
Comment
Question by:cawasaki
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 40006300
Hi,

Use LDIFDE to import and export directory objects to Active Directory. its very easy.

firstly export groups then users.

CSVDE -f adusers.csv

CSVDE -i -f Newport.csv


http://support.microsoft.com/kb/237677
0
 

Author Comment

by:cawasaki
ID: 40006936
hello,

ok i have success to export and inport user, but i have a problem to import group, so any one have a working script to export and import group with memeber if possible?
0
 
LVL 13

Accepted Solution

by:
Santosh Gupta earned 500 total points
ID: 40007187
ldifde -f c:\LDIFDE_export\export_Groups_WITH_Members.ldf -s <DC NAME> -d "<DOMAIN DN>" -p subtree -r "(&(ObjectCategory=group)(objectClass=group)(name=*)(member=*))" -l "member" -j c:\

http://social.technet.microsoft.com/Forums/windowsserver/en-US/1b24edf2-9af5-447c-9f15-631e88eefe8c/exporting-users-groups-and-their-members-from-a-currently-installed-and-importing-them-to-a-new
0
 

Author Comment

by:cawasaki
ID: 40008303
i have already test this and import not work:

Logging in as current user using SSPI
Importing directory from file "c:\temp\export_Groups_WITH_Membersv3.ldf"
Loading entries......................
Add error on entry starting on line 244: Unwilling To Perform
The server side error is: 0x209a Access to the attribute is not permitted becaus
e the attribute is owned by the Security Accounts Manager (SAM).
The extended server error is:
0000209A: SvcErr: DSID-031A0FBB, problem 5003 (WILL_NOT_PERFORM), data 0

0 entries modified successfully.
An error has occurred in the program
No log files were written.  In order to generate a log file, please
specify the log file path via the -j option.

Open in new window

0
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 40009146
Hi,

see the url for import error.. http://support.microsoft.com/kb/276382
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

914 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

16 Experts available now in Live!

Get 1:1 Help Now