Active Directory - Get Object Path

 

Declaration

<AMGETADOBJECT LDAPPATH="text" ADOBJECT="text [options]" OBJECTNAME="text" RESULTVARIABLE="text" USERNAME="text" PASSWORD="text"/>

See Also

AD - Create Object | AD - Create User | AD - Delete Object | AD - Get Group Members | AD - Get Object Dataset | AD - Get Object Property | AD - List Object Path | AD - Modify Group | AD - Modify User | AD - Move Object | AD - Rename Object | AD - Create Group

Description

Populates a variable with the LDAP (Lightweight Directory Access Protocol) path of the specified Active Directory object (i.e. user, computer, OU, etc.).

IMPORTANT: In order to properly use AutoMate's Active Directory actions, you should have a basic understanding of Active Directory and related components (e.g. domain controllers, trust relationships, forests, OUs, LDAPs, etc.) Also, to ensure that these actions function appropriately, the target system must be part of a domain.

Practical Usage

Gets the path of a specific Active Directory object. The path can be specified in subsequent Active Directory operations.

Parameters

General Properties

Property

Type

Req'd

Default

Markup

Description

Parent Path

Text

Yes

(Empty)

LDAPPATH=

"LDAP://DC=netauto,DC=com"

The Lightweight Directory Access Protocol (LDAP) path of the parent Active Directory container. This is usually the top most container or rootDSE path; the root of the directory data tree on a directory server. Click the Select Container button to launch a standard Windows Active Directory dialog that allows for the selection an Active Directory container.

Name

Text

Yes

(Empty)

OBJECTNAME="Scott"

The name of the Active Directory object in which to retrieve the path from. Wildcards such as * and ? can be used to filter the name. For example, entering S* will filter all Active Directory object names starting with the letter S.

Type

Text (Options)

Yes

User

ADOBJECT="GROUP"

The Active Directory object type in which to retrieve the path from. The available options are:

  • User (default)

  • Computer

  • Group

  • Organization Unit

  • Printer

Populate variable with path

Text

Yes

(Empty)

RESULTVARIABLE="varname"

Indicates the  variable to be populated with the first object's LDAP path found in the Active Directory matching the name.

Credentials Properties

Property

Type

Req'd

Default

Markup

Description

Username

Text

No

(Empty)

USERNAME="username"

Specifies the username of the Active Directory user.

NOTE: Leave the Username and Password fields blank in order to use the logon user's credentials. If only accessing Active Directory information, then any Domain user is valid. However, a Domain Administrator is required in order to modify an Active Directory user or group. We recommend using the credentials of a Domain Administrator for all AutoMate Active Directory actions.

Password

Text

No

(Empty)

PASSWORD="password"

Specifies the password of the Active Directory user.

NOTE: Leave the Username and Password fields blank in order to use the logon user's credentials. If only accessing Active Directory information, then any Domain user is valid. However, a Domain Administrator is required in order to modify an Active Directory user or group. We recommend using the credentials of a Domain Administrator for all AutoMate Active Directory actions.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties allows you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables and Functions

All text fields allow the use of expressions such as variables, functions or AutoMate extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on function

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Get the path of the USER Active Directory object with the name of "G*" and store it in variable "ObjectPath".

 

<AMGETADOBJECT LDAPPATH="LDAP://OU=My Company Employees,DC=mycompany,DC=com" ADOBJECT="USER" OBJECTNAME="G*" RESULTVARIABLE="ObjectPath" />

 

↑ [Top of Page]