Csvde --- import and export data files that store data from the Active Directory domain service (ad ds) in CSV format using commas.
Csvde usage:
The first line is attribute and cannot be divided. A user occupies one line and cannot import the user's password because the password must be sent through the encrypted channel. Therefore, the imported user must be disabled.
Common image classes:
DN: storage path objectclass: Object Type samaccountname: Login Name displayname: Display name useraccountcontrol: User status enable 512 disable 514
DN, objectclass, samaccountname, displayname, useraccountcontrol
"Cn = A, ou = test, Dc = easthome, Dc = com", user, a, a, 514
"Cn = B, ou = test, Dc = easthome, Dc = com", user, B, B, 514
"Cn = C, ou = test, Dc = easthome, Dc = com", user, C, C, 514
Save to the C root directory, such as c: \ test.txt
650) This. width = 650; "Title =" 1.jpg" alt = "wkiol1o4custapnzaaehodxuj8e174.jpg" src = "http://s3.51cto.com/wyfs02/M02/39/4F/wKioL1O4CUSTaPnzAAEHoDxuJ8E174.jpg"/>
Open CMD and use csvde-I-f c: \ test.txt
-I is specified as the import mode. If it is not specified, the default export mode is used.
-F filename: Identify the imported or exported file name
-K ignores errors during the import operation and continues to process them.
650) This. width = 650; "Title =" 2.jpg" alt = "wKioL1O4CjfAmuPNAAFz5MwSG-E657.jpg" src = "http://s3.51cto.com/wyfs02/M01/39/4F/wKioL1O4CjfAmuPNAAFz5MwSG-E657.jpg"/>
Result
650) This. width = 650; "Title =" 3.jpg" alt = "wkiol1o4cpki47uhaaff1pnqoso645.jpg" src = "http://s3.51cto.com/wyfs02/M01/39/4F/wKioL1O4CpKi47uhAAFF1pNqOso645.jpg"/>
By the way, to enable users in batches, set the password first:
Net User Username Password
650) This. width = 650; "Title =" 4.jpg" alt = "wKioL1O4C1-DUxPVAACTqKQgy5E219.jpg" src = "http://s3.51cto.com/wyfs02/M00/39/4F/wKioL1O4C1-DUxPVAACTqKQgy5E219.jpg"/>
Save as BAT file for execution
650) This. width = 650; "Title =" 5.jpg" alt = "wkiol1o4c4nyrsqpaafgyotwrxs242.jpg" src = "http://s3.51cto.com/wyfs02/M02/39/4F/wKioL1O4C4nyrsqPAAFgyOTWrXs242.jpg"/>
Enable account again
650) This. width = 650; "Title =" 6.jpg" alt = "wKioL1O4C-egjebYAAFTb0-1qIY887.jpg" src = "http://s3.51cto.com/wyfs02/M00/39/4F/wKioL1O4C-egjebYAAFTb0-1qIY887.jpg"/>
Http://technet.microsoft.com/zh-cn/library/cc732101
Ldifde --- create, modify, and delete directory objects. You can also use ldifde to expand the architecture, export Active Directory user and group information to other applications or services, and populate the data in other directory services with Active Directory domain service (ad ds ).
Demonstrate import and export, export the three users created in ou = test
Ldifde-f c: \ User. LDF-d "ou = test, Dc = easthome, Dc = com"-r objectclass = user-l objectclass, displayname, name
-F export to c: \ User. LDF
-D. Set the search range.
-R: Specifies the export object as the user.
-L export object, display name and name
650) This. width = 650; "Title =" 1.jpg" alt = "wKiom1O4EiDxUUoIAAE-0cPLi2U434.jpg" src = "http://s3.51cto.com/wyfs02/M00/39/50/wKiom1O4EiDxUUoIAAE-0cPLi2U434.jpg"/>
Result:
650) This. width = 650; "Title =" 2.jpg" alt = "wkiol1o4ejdyfnzwaahyutazk64390.jpg" src = "http://s3.51cto.com/wyfs02/M02/39/50/wKioL1O4EjDyfnzWAAHyuTazK64390.jpg"/>
Delete the user and then use ldifde to import the object:
Ldifde-I-f c: \ User. LDF
650) This. width = 650; "Title =" 3.jpg" alt = "wkiol1o4ettxfauqaab_f_su5f8996.jpg" src = "http://s3.51cto.com/wyfs02/M01/39/50/wKioL1O4EtTxfAUqAAB_F_su5f8996.jpg"/>
The password is not included during export, so it is disabled after import,
650) This. width = 650; "Title =" 4.jpg" alt = "wkiom1o4e0hxko0baae5jtm8lpcie 25.jpg" src = "http://s3.51cto.com/wyfs02/M02/39/50/wKiom1O4E0HxKo0bAAE5jtM8lBI225.jpg"/>
For example, you can set passwords in batches and enable the passwords before using them.
Http://technet.microsoft.com/zh-cn/library/cc731033 (V = ws.10). aspx
Common DS commands:
Modify user department attributes
650) This. width = 650; "Title =" 5.jpg" alt = "wkiom1o4frlxa1rvaaeeviezaag565.jpg" src = "http://s3.51cto.com/wyfs02/M02/39/50/wKiom1O4FrLxA1RVAAEEVIeZaag565.jpg"/>
Show user email
650) This. width = 650; "Title =" 6.jpg" alt = "wkiom1o4fs3zuualaaggajfthre011.jpg" src = "http://s3.51cto.com/wyfs02/M00/39/50/wKiom1O4Fs3zuuALAAGGAjfTHRE011.jpg"/>
Delete user B and create user d
650) This. width = 650; "Title =" 7.jpg" alt = "wKioL1O4FszRHSi1AAHHBV-hWHI398.jpg" src = "http://s3.51cto.com/wyfs02/M02/39/50/wKioL1O4FszRHSi1AAHHBV-hWHI398.jpg"/>
Test the following command:
A: Create ou dsadd ou "ou = ABC, Dc = easthome, Dc = com"
B: Create Sub-ou dsadd ou "ou = subabc, ou = ABC, Dc = easthome, Dc = com"
C: delete all projects under ou = ABC
Dsrm-subtree-exclude-noprompt-c "ou = ABC, Dc = easthome, Dc = com"
D: Change the User Password dsmod user "cn = D, ou = test, Dc = easthome, Dc = com"-PWD [email protected]
E: enable account dsmod user "cn = D, ou = test, Dc = easthome, Dc = com"-disabled no
You can also use the cyclic command for... do for batch creation. For details, refer:
Http://blog.sina.com.cn/s/blog_710fd9ac01012xvp.html
This article is from "1 + 1 = ?" Blog. For more information, contact the author!