Add user’s code with dsadd


Description:   This tool command adds some specific object types to the directory. dsadd   Command:

dsadd   computer  –  Add the computer to the directory.
dsadd   contact  –  Add contacts to the directory.
dsadd   group  –  Add the group to the directory.
dsadd   ou  –  Add the organizational unit to the catalog.
dsadd   user  –  Add users to the directory.
dsadd   quota  –  Add the quota rule to the directory partition.

To find help for a specific command, type  ” dsadd  < ObjectType>  /?”, there
<ObjectType>   Is the type of one of the supported objects shown above.
For example, dsadd   ou  /?。

Commas that are not used as separators in distinguished names must be backslashed  (“\”)  Character escape
(for example, “CN = company \,   Inc.,CN=Users,DC=microsoft,DC=com”)。
Backslashes used in distinguished names must be escaped with a backslash (for example,
“CN=Sales\\ Latin America,OU=Distribution Lists,DC=microsoft,DC=com”)。

Directory service command line tool help:
dsadd  /? –  Help for adding objects.
dsget  /? –  Displays help for the object.
dsmod  /? –  Help for modifying objects.
dsmove  /? –  Help for moving objects.
dsquery  /? –  Find help that matches the search criteria object.
dsrm  /? –  Help for deleting objects.

Copy codeThe code is as follows:
for /f “tokens=1,2,3,4,5,6 delims=,” %a in (information.csv) do dsadd user “cn=%d,ou=HR,dc=contoso,dc=com” -samid %d -upn %[email protected] -ln %b -fn %c -pwd %e -disabled yes

Recommended Today

Kafka source learning: Kafka APIs leader_ AND_ ISR

Link to the original text:…This source code is based on Kafka 0.10.2 Whenever the controller changes state, it will call thesendRequestsToBrokersMethod sendleaderAndIsrRequestThis paper mainly introduces the logic and process of Kafka server processing the request. LEADER_AND_ISR Overall logical process case ApiKeys.LEADER_AND_ISR => handleLeaderAndIsrRequest(request) Receive leader on server side_ AND_ After ISR request, thehandleLeaderAndIsrRequestThe processing flow […]