Any way to spawn a Task of a Job with a new Host defined by AE script?

Discussion created by Michael_Coxson_5769 on Feb 16, 2017
Latest reply on Feb 17, 2017 by Michael_Coxson_5769
Is there any way to add or modify a Task and specify a Host without having the Host variablized?  I have a Job that typically runs on a HostGroup (AgentGroup) and I have scripted a process to pull the list of Hosts (Agents) from that object and give a prompt to select one or more to spawn Tasks for, but I cannot seem to find any way to update the Task host.

I even tried being sneaky and setting up a Job with a predefined HostGroup with a Preprocess check to see if the agent variable had been set and if so do a PUT_ATT HOST, but apparently if the Host is already defined PUT_ATT does not replace it.  I could work around this by making a completely separate duplicate Job with all the same information except the Host as a variable, but I really would like to keep it with as few objects as possible.