get_object_field
Use the get_object_field
command to return the value of a specified field from the currently selected Active Directory object stored in memory. The get_object_field
command does not query Active Directory for the object. If you change field values using ADEdit without saving the object to Active Directory, the field value you retrieve using get_object_field
won’t match the same field value for the object stored in Active Directory.
Zone Type
Not applicable
Syntax
get_object_field field
Abbreviation
gof
Options
This command takes no options.
Arguments
This command takes the following argument:
Argument | Type | Description |
---|---|---|
field | string | Required. Specifies the case-sensitive name of the field whose value to retrieve. The possible values include any attribute that can be defined for the type of object currently selected. Special values are: sid: The object’s security identifier. guid: The object’s globally unique identifier. sd: The object’s security descriptor. createTime: The time and date this object was created, returned in generalized time format. modifyTime: The time and date this object was last modified, returned in generalized time format. dn: The object’s distinguished name. |
Return Value
This command returns a field value, which varies in type depending on the data type stored by the field.
Examples
get_object_field guid
This example returns the globally unique identifier for an object. For example:
44918ee7-80bc-4741-95d3-dd189e235ab8
Related Commands
Before you use this command, you must have a currently selected Active Directory object stored in memory. The following commands enable you to view and select the object to work with:
get_objects
performs an LDAP search of Active Directory and returns a Tcl list of the distinguished names of matching objects.new_object
creates a new Active Directory object and stores it in memory.select_object
retrieves an object with its attributes from Active Directory and stores it in memory.
After you have an Active Directory object stored in memory, you can use the following commands to work with that object’s attributes, delete the object, or save information for the object:
add_object_value
adds a value to a multi-valued field attribute of the currently selected Active Directory object.delete_object
deletes the selected Active Directory object from Active Directory and from memory.delete_sub_tree
deletes an Active Directory object and all of its children from Active Directory.get_object_field_names
returns a Tcl list of the field names (attributes) for the currently selected Active Directory object.remove_object_value
removes a value from a multi-valued field attribute of the currently selected Active Directory object.save_object
saves the selected Active Directory object with its current settings to Active Directory.set_object_field
sets a field value in the currently selected Active Directory object.