title: How to select a node name as a parameter in jenkins using a selection list of some sort
body: <p>I need to know if there is a plugin of some sort that you can select a node from a jenkins job and use that node name as a parameter to be passed to a Windows batch command</p>
  
  <p>I have played with the Configuration Matrix using an Elastic-Axis or Slaves (Screenshot below where you can tick the names) plugins</p>
  
  <p><a href="https://i.stack.imgur.com/t5uGL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t5uGL.jpg" alt="enter image description here"></a></p>
  
  <p>But these all go and execute the Windows batch command on that selected node.</p>
  
  <p>I don't want to execute it on that server but rather on the main node and only pass the value of the slave/label to the windows batch command.</p>
  
  <p>I were able to do it as described here but that involves 2 jobs and a groovy scripts to interrogate the slaves/nodes config. Write it to a properties file and pass the properties file to the next job.</p>
  
  <p><a href="https://stackoverflow.com/questions/28341081/jenkins-how-to-get-node-name-from-label-to-use-as-a-parameter">Jenkins: How to get node name from label to use as a parameter</a></p>
  
  <p>I need to do about 30 jobs of these and hence would like to try to do all in one job - if I used my solution in the link above, 30 jobs would double in 60 jobs and maintenance would be kind of a nightmare.</p>
  
  <p>I also would not like to have a string parameter and hard code the name of the slave/node as that will not ensure the use of only the available slaves/nodes but any server name can be entered and that would can be a problem where someone can mistype a server name for example pointing to a Production server instead of a test server.</p>