Directory Service (DS) built-in tools for Windows Server 2003
The DS (Directory Service) group of commands are split into following two families
1.
DSadd - add Active Directory users and groups
DSmod - modify Active Directory objects
DSrm - to delete Active Directory objects
DSmove - to relocate objects
DSQuery - to find objects that match your query attributes
DSget - list the properties of an object
DS Syntax
These DS tools have their own command structure which you can split into five parts:
1 2 3 4 5
Tool object "DN" (as in LDAP distinguished name) -switch value For example:
DSadd user "cn=billy, ou=managers, dc=cp, dc=com" -pwd cX49pQba
This will add a user called Billy to the Managers OU and set the password to cx49Qba
Here are some of the common DS switches which work with DSadd and DSmod
-pwd (password) -upn (userPrincipalName) -fn (FirstName) -samid (Sam account name).
The best way to learn about this DS family is to logon at a domain controller and experiment from the command line. I have prepared examples of the two most common programs. Try some sample commands for DSadd.
˚
2.
Two most useful Tools: DSQuery and DSGet
The DSQuery and DSGet remind me of UNIX commands in that they operate at the command line, use powerful verbs, and produce plenty of action. One pre-requisite for getting the most from this DS family is a working knowledge of LDAP.
If you need to query users or computers from a range of OU's and then return information, for example, office, department manager. Then DSQuery and DSGet would be your tools of choice. Moreover, you can export the information into a text file
No comments:
Post a Comment