How can i Launch agent in Jenkins by using command/program

Use Case:

  1. Connecting to a station using Jenkins

  2. Creating a VM in that station

  3. required to connect to VM and execute commands in that VM

Issue:

How can i establish connection to newly created VM in the Same job and execute my program ?