Job - listTargetServers

Job - listTargetServers

Description :

This command returns a list of server names that are targets of a specific Job. Only servers in the state(s) specified by the serverState argument are returned.

The serverState argument can be combination of the following. Separate multiple states by commas:

  • DECOMMISSIONED
  • ENROLLED
  • NOT-ENROLLED

Note: This command is not relevant for Provisioning Jobs.

Return type : java.util.List

Command Input :

Variable Name

Variable Type

Description

jobKey

DBKey

Handle to the job.

serverState

String

The desired server states.

Example

The following example shows how to get the DECOMMISSIONED or NOT_ENROLLED server targets of a job.

Script

JOB_KEY=`blcli AuditJob getDBKeyByGroupAndName /group1 auditJob1` 

blcli Job listTargetServers $JOB_KEY DECOMMISSIONED,NOT-ENROLLED 

Was this page helpful? Yes No Submitting... Thank you

Comments