isolated first found instance of imagecompressor.job.exe to simplify ret...

...urn value checks.

basically, you had it in your tweet.  the convention of select -first 1 is used often to isolate the first found "thing" and guarantee a scalar result.

alternatively, you can force the results to a list by surrounding them with @().  e.g.,:

    $imgOptimizer = @(Get-ChildItem -Path $toolsDir -Include 'ImageCompressor.Job.exe' -Recurse)
    #imgOptimizer is now a list, which may be empty