Hi,
I am trying to use start-job with a scriptblock while passing args. The start-job runs, but the exe never starts on my local machine. I can't figure out why it will not start. Calling with -filepath works. Although, when I do that I call it differently. I use a ps1 script to invoke the exe. I haven't been able to call this while stating a scriptblock. Although filepath turns everything after into a scriptblock.
$sb = {'C:\Program Files\app\Cache.exe $args[0]'} start-job -scriptblock $sb -argumentlist "/arg /item1=arg /item2=arg /item3=arg" -name CCC
Just for comparision, my ps1 script
$app = "C:\Program Files\app\Cache.exe",
$aargs = "/arg /item1=arg /item2=arg /item3=argstart-Process $app -PassThru $aargs -wait