title: Run a program in a ForEach loop
body: <p>I'm trying to get this simple PowerShell script working, but I think something is fundamentally wrong. ;-)</p>
  <pre><code>ls | ForEach { &quot;C:\Working\tools\custom-tool.exe&quot; $_ }
  </code></pre>
  <p>I basically want to get files in a directory, and pass them one by one as arguments to the custom tool.</p>