# How to call external program from powershell script WITHOUT waiting?

**URL:** <https://forums.powershell.org/t/how-to-call-external-program-from-powershell-script-without-waiting/23654>\
**Category:** PowerShell Help\
**Created:** [February 27, 2024, 7:04am UTC](https://forums.powershell.org/t/how-to-call-external-program-from-powershell-script-without-waiting/23654 "2024-02-27T07:04:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pstein](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@pstein](https://forums.powershell.org/u/pstein)\
**Post date:** [February 27, 2024, 7:04am UTC](https://forums.powershell.org/t/how-to-call-external-program-from-powershell-script-without-waiting/23654/1 "2024-02-27T07:04:25Z")

</div>

Assume I have a powershell script foobar.ps1.

I want to call another, external cmdline program (not powershell script) from inside this script (and pass some arguments).

example:

“D:\tools\exiftool.exe” -n “D:\test\sample.jpg”

How can I implement this call?

The calling powershell script should NOT wait for end of execution of the external program but immediately continue with the next statement.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [February 27, 2024, 8:03am UTC](https://forums.powershell.org/t/how-to-call-external-program-from-powershell-script-without-waiting/23654/2 "2024-02-27T08:03:25Z")

</div>

When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( \</\> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

[How to format code in PowerShell.org](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/b/bee50c628238f2c076c0504efb6b15f2fb11f002.gif) 1 \<---- Click 👆🏽 😉

( !! Sometimes the _preformatted text_ button hides behind the settings gear symbol. 😉 )

> [@pstein](#):
>
> How can I implement this call?

What have you tried so far? Have you tried anything yet?

```auto
"D:\tools\exiftool.exe" "-n D:\test\sample.jpg"

```

> [@pstein](#):
>
> The calling powershell script should NOT wait for end of execution of the external program but immediately continue with the next statement.

The behaviour depends on the external tool as well. Some return the control immediately back to the calling process and some others don’t.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [March 28, 2024, 8:03am UTC](https://forums.powershell.org/t/how-to-call-external-program-from-powershell-script-without-waiting/23654/3 "2024-03-28T08:03:41Z")

</div>

Closed on March 28, 2024, 8:03am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
