title: Jenkins Slave Self Register
body: <p>I am creating a Jenkins master/slave cluster and I am having trouble finding a way to have new slaves auto register themselves with the master.</p>
  
  <p>My current set up is I run some Terraform scripts that will create the master and 5 slaves. Then I have to log in to the master node and Manage Jenkins -> Manage Nodes -> New Node and manually create the number of nodes I want.</p>
  
  <p>Then I RDP into my slaves and run the command <code>java -jar agent.jar -jnlpUrl http://yourserver:port/computer/agent-name/slave-agent.jnlp</code>. This works perfectly fine, but I would like a way to auto scale up/down the number of agents without having to manually log into the slaves every time I create a new one.</p>
  
  <p>Is there a plugin or some documentation I'm missing about how to dynamically self register nodes?</p>
  
  <p>NOTE: This only applies to windows nodes. I am using the Kubernetes plugin to auto scale up/down linux nodes, but Kubernetes does not have stable windows nodes support so I can't use that. I have to support classic .NET applications (not .NET Core) so I have to build on windows nodes.</p>