set_object_field
Use the set_object_field command to set the value for a specified field in the currently selected Active Directory object stored in memory. The set_object_field command does not set a field value stored in Active Directory for this object.
If you change any fields, you must save the object using the save_object command for your changes to take effect in Active Directory. If you select another object or end the ADEdit session before saving the currently selected object, your changes will be lost.
The set_object_field command does not check to see if fields and values are valid. When you save an object, Active Directory will check fields and values at that time and report an error if they aren’t valid.
Zone Type
Not applicable
Syntax
set_object_field field value
Abbreviation
sof
Options
This command takes no options.
Arguments
This command takes the following arguments:
| Argument | Type | Description |
|---|---|---|
| field | string | Required. Specifies the name of the field you want to set. The field argument can by any attribute that is valid for the type of Active Directory object currently selected in memory. |
| value | Required. Specifies the value to assign to the specified field. The data type depends on the specified field. The set_object_field command does not check whether the value is valid. Active Directory will check for valid values when ADEdit saves the object. |
Return Value
This command returns nothing if it runs successfully.
Examples
set_object_field sd $sdvalue
This example sets the current object’s security descriptor field to the string contained in the variable sdvalue (an SDDL string).
Related Commands
The following commands enable you to view and select Active Directory objects:
get_objectsperforms an LDAP search of Active Directory and returns a Tcl list of the distinguished names of objects matching the specified search criteria.new_objectcreates a new Active Directory object and stores it in memory.select_objectretrieves an object with its attributes from Active Directory and stores it in memory.
After you have an object stored in memory, you can use the following commands to work with that object:
add_object_valueadds a value to a multi-valued field attribute of the currently selected Active Directory object.delete_objectdeletes the selected Active Directory object from Active Directory and from memory.delete_sub_treedeletes an Active Directory object and all of its children from Active Directory.get_object_fieldreads a field value from the currently selected Active Directory object.remove_object_valueremoves a value from a multi-valued field attribute of the currently selected Active Directory object.save_objectsaves the selected Active Directory object with its current settings to Active Directory.