How to call external program from powershell script WITHOUT waiting?

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.

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 1 <---- Click :point_up_2:t4: :wink:

( !! Sometimes the preformatted text button hides behind the settings gear symbol. :wink: )

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

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

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

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