Job - getTargetServers


Job - getTargetServers

Description :

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

This command is deprecated.  Use the listTargetServers command instead.

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 getTargetServers $JOB_KEY DECOMMISSIONED,NOT-ENROLLED



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*