blcli_execute NSHScriptJob getDBKeyByGroupAndName "$JOB_FOLDER" "$JOB_NAME"
blcli_execute Job getTargetServers $JOB_KEY $SERVER_STATE
$TARGET_LIST will be the list of targets of your job that are still enrolled in the system
Review BLCLI Help / Job / getTargetServers for other ServerStates (for example technically the job can also contain servers that are decommisioned)
The command "getTargetServers" did not work for the namespace "Job". I am using BladeLogic Version 126.96.36.1997. Below is the error.
Error Jun 30, 2012 7:37:21 PM Unknown command : name space = 'Job', command = 'getTargetServers'.com.bladelogic.cli.factory.CommandNotFoundException: Name space : Job has no commands by name : getTargetServers
My JOBKEY was of the format DBKey:SJobKey:6455635-1
This command is not available in 7.6.
Why do you need to get the target server list ?
1 of 1 people found this helpful
I've looked into this, and there is no way to get the target list for the job in pre 8.2 version. The command that I mentioned was added in 8.2.