Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


4.4.2 Searching for an object in the Active Directory

Function

This plug-in searches for an object for the Active Directory of the specified server. The search result is output to the file specified in the output path (common.outputFilePath property). If no parent folder exists for the specified file, this plug-in creates that folder.

The prerequisite server for this plug-in is as follows:

- Execution target server

This server is used as the target for executing this plug-in. The Active Directory shown in the Prerequisite condition needs to be set up beforehand.

This plug-in allows you to search for the following objects:

- Group

- User

- Contact

- Organization Unit (OU)

Scripts in this plug-in perform the following processing:

- Execution of the following command

dsquery

"value-of-object-type(Windows.objectType-property)"

"value-of-search-start-node(Windows.startNode-property)"

[-name "value-of-object-name(Windows.objectName-property)"]

[-desc "value-of-explanation(Windows.description-property)"]

[-upn "value-of-user-principal-name(Windows.userPrincipalName-property)"]

-limit "0"

For details of the dsquery command, see the relevant sections in the Microsoft library.

The following is a file output example for this plug-in:

- Output example

"OU=SampleOU1,OU=testOU,DC=example,DC=co,DC=jp"

"OU=SampleOU2,OU=testOU,DC=example,DC=co,DC=jp"

Use situation

This plug-in is used to search for an object in the Active Directory.

Prerequisites

For the latest support status of the following items, see the Release notes: Prerequisite product within the system, prerequisite products on the execution target server, and running OS on the execution target server.

Prerequisite product within the system:

- JP1/Automatic Operation 11-00 or later

Prerequisite products on the execution target server:

(1) Active Directory domain service

(2) DNS server

Running OS on the execution target server:

(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter

(2) Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

(3) Windows Server 2016 Standard/Datacenter

(4) Windows Server 2019 Standard/Datacenter

Conditions of using prerequisite products on the execution target server:

None

Cautions

(1) Do not use a character string containing a double quotation mark (") or a single quotation mark (') in a plug-in property.

(2) If a file is already specified for the output file path (common.outputFilePath property), that file is overwritten.

Version

02.00.01

Plug-in tags

Gather Active Directory information,Windows,Active Directory

Plug-in name displayed in the task log

adSearchObject

Return code

0: Normal

12: Abnormal (user mistake), illegal property

21: Abnormal (illegal environment), command unfound (error detected in plug-in script)

27: Abnormal (Check the error details from the task log.)

41: Abnormal (error detected within the plug-in), property not entered (error detected in the plug-in script)

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

plugin.destinationHost

Host name of the execution target server

Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported.

--

Input

R

Windows.objectType

Object type

Specify the type of the object to search for. Specifiable values are "group", "user", "contact", and "ou".

--

Input

R

Windows.startNode

Search start node

Specify a node with which you want to start the search. As a search start node, you can specify "forestroot", "domainroot", or a domain identifier, in a format beginning with DC=.

domainroot

Input

R

Windows.objectName

Object name

Specify the name of the object to search for. You can use an asterisk (*) as a wild card.

--

Input

O

Windows.description

Explanation

Specify the explanation of the object to search for. You can use an asterisk (*) as a wild card.

--

Input

O

Windows.userPrincipalName

User principal name

Specify the user principal name of the object to search for. You can specify this if the type of the object to search for is "user".

--

Input

O

common.outputFilePath

Output file path

Specify an output file by using a full path.

--

Input

R

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O