# Launch a Jenkins JNLP agent with Powershell script

**URL:** <https://community.jenkins.io/t/launch-a-jenkins-jnlp-agent-with-powershell-script/7166>\
**Category:** Ask a question\
**Tags:** question\
**Created:** [May 3, 2023, 8:21pm UTC](https://community.jenkins.io/t/launch-a-jenkins-jnlp-agent-with-powershell-script/7166 "2023-05-03T20:21:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMvongo](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@AMvongo](https://community.jenkins.io/u/AMvongo)\
**Post date:** [May 3, 2023, 8:21pm UTC](https://community.jenkins.io/t/launch-a-jenkins-jnlp-agent-with-powershell-script/7166/1 "2023-05-03T20:21:26Z")

</div>

Hello everyone,

I am new to the community and very glad to be here !!

I have a question: we have a Jenkins controller ( 2.370 ) Windows server running on a bare metal. And we created agents , we launch them from a command line with secret stored in the xml file. How can i launch the agents with a Powershell script?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [May 3, 2023, 10:05pm UTC](https://community.jenkins.io/t/launch-a-jenkins-jnlp-agent-with-powershell-script/7166/2 "2023-05-03T22:05:38Z")

</div>

> <https://stackoverflow.com/questions/28691344/how-to-call-a-java-program-from-powershell>

something like

```auto
 Start-Process java -ArgumentList '-jar', 'agent.jar' `-RedirectStandardOutput '.\console.out' -RedirectStandardError '.\console.err' 

```

maybe?

Without any details about what you’ve tried, and why what you have doesn’t work, its hard to give info
