You can use the Ldifde.exe utility to export all directory objects to an .ldf file. The following command searches Houston OU and creates a file called exportdirectory.ldf containing those objects and its attributes:
Export Command ldifde -m -f c:\exportdirectory.ldf -d "OU=Houston,dc=Sivarajan,dc=Lab"
This command will export all the directory objects inside Houston OU to exportdirectory.ldf file.
The reason I used "-m" switch is, it will automatically strip all system-owned attributes when exporting the objects. If you don't use "-m" or filter using "-r" or "-o" option, you will get the following error message when you try to import the objects into Active Directory
"Unwilling to perform. The modification was not permitted for security reasons"
Import Command
ldifde -i -f c:\exportdirectory.ldf
Also, you can use CSVDE command to import and export Active Directory objects.
Export Using CSVDE command
csvde -f c:\exportdirectory.csv -d "OU=Houston,dc=Sivarajan,dc=Lab"
Import Using CSVDE command
csvde -i -f c:\exportdirectory.csv
0 comments:
Post a Comment