Active Directory - List Object Path

 

Declaration

<AMGETADOBJECTSLIST GETADOBJECTSUSING="text [options]" LDAPPATH="text" ADOBJECT="text" OBJECT "text [options]" FILTER="text" CUSTOM FILTER="text" QUERY="text" RESULTDATASET="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 Path | AD - Get Object Property | AD - Modify Group | AD - Modify User | AD - Move Object | AD - Rename Object | AD - Set Object Property

Description

Retrieves a list of the paths for all the Active Directory objects (i.e. computers, users, groups, etc.) at and below the specified path and populates a dataset with resulting values. Results can be filtered by object type and/or a filter string.

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

Can be used along with other Active Directory actions to create a report with essential information on Active Directory infrastructure and objects. Reports can be created for management, distribution and/or auditing purposes.

Parameters

General Properties

Property

Type

Required

Default

Markup

Description

Get Active Directory Using

Text (options)

No

Simple Filter

ACTION="CUSTOMFILTER"

The manner in which to retrieve the Active Directory object's LDAP (Lightweight Directory Access Protocol) paths. The available options are:

  • Simple Filter (Default): Selects the Active Directory objects using simple filter.

  • Custom Filter: Selects the Active Directory objects using more advance custom filter.

  • ADO Query (SQL or LDAP syntax): Selects the Active Directory objects using more advanced SQL or LDAP query.

Parent Path

Text

Yes

(Empty)

LDAPPATH=

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

The LDAP path of the parent Active Directory object. Usually the top most container or rootdse path.

Click the Select Container button to select the parent container from the domain. When doing so, this launches a standard Windows Active Directory dialog box that allows for selection of the container.

NOTE: The Parent Path parameter is available only if Simple Filter or Custom Filter is selected from the Get Active Directory Using parameter.

Object

Text (options)

No

User

ADOBJECT="GROUP

The type of object in which to retrieve its path from. The available options are:

  • User

  • Computer

  • Group

  • OrganizationUnit

  • Printer

Filter

Text

Yes

(Empty)

FILTER="R*"

Provides the filter string to search for specific Active Directory objects.

Custom Filter

Text

Yes

(Empty)

CUSTOMFILTER="(&amp; (objectCategory=user) (name=*) )"

Allows you to enter custom filter string.

NOTE: This parameter is available only if the Custom Filter option is selected from the Get Active Directory Using parameter.

Query statement (SQL or LDAP syntax)

Text

Yes

(Empty)

QUERY="SELECT ADsPath FROM 'LDAP://networkautomation.com' WHERE objectCategory='organizationalUnit'"

Allows you to enter a SQL or LDAP ADO query string.

NOTE: This parameter is available only if the ADO Query (SQL or LDAP syntax) option is selected from the Get Active Directory Using parameter.

For more details regarding ADO Query, refer to: http://technet.microsoft.com/en-us/library/aa996205.aspx.

Create and populate dataset with paths

Text

Yes

(Empty)

RESULTDATASET="ADObjects"

The name of a dataset in which to create and populate with the results.

Credentials Properties

Property

Type

Required

Default

Markup

Description

Username

Text

No

(Empty)

USERNAME="username"

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"

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.

Additional Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions
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: List all Active Directory object paths and populate dataset "ADObjects" with the results.

<AMGETADOBJECTSLIST GETADOBJECTSUSING="CUSTOMFILTER" LDAPPATH="LDAP://servername.com" CUSTOMFILTER="(&amp; (objectCategory=user) (name=*) )" RESULTDATASET="ADObjects" USERNAME="administrator" PASSWORD="AM2PBmJg27fZts7GYeDb99x20wZ6IMd3xXbaME" />

↑ [Top of Page]