Learning to use ADEdit
You can use ADEdit interactively to run individual commands or to execute scripts directly. You can use ADEdit commands in scripts that you convert into executable files that can be execute outside of ADEdit sessions. Because scripts can automate and simplify many administrative tasks, it is important for you to know how to combine ADEdit commands in the proper sequence to get the results you are looking for.
The following illustration provides an overview of the logical process.
- Bind ADEdit to one or more domains within a forest.
The domains to which you bind will define the logical boundaries within which all subsequent commands work.
Select an existing Active Directory object or create a new object with which to work.
You can use
selectcommands to retrieve existing object from Active Directory and store them in memory. You can use
newcommands to create new objects of a specified type and store them in the ADEdit context as the currently selected object.
There are also
createcommands that create a new objects in Active Directory without putting the object in the ADEdit context. You must explicitly
selectobjects that are created with
After you select an object to work with and it is stored in memory—that is, the object is in the ADEdit context—you can read field values to see their current settings or write field values to change their current state.
Save the selected object and any settings you changed.
If you modify an object in memory or you have created a new object in memory, you must save it back to Active Directory for your changes to have any effect.
As these steps suggest, ADEdit is very context-oriented. The bindings you set and the objects you select determine the ADEdit current context. All commands work within that context. If you select a zone, for example, subsequent commands use the selected zone as the context in which to add new zone users, zone computers, and zone groups.
Outside of scripts that perform the most common administrative tasks, you might use ADEdit commands differently and without following these steps. For example, you might use ADEdit to convert data from one format to another, view help, or get information about the local computer without following the typical logic flow, but those tasks would be exceptions to the general rule.