Sometime ago i had asked how to run multiple commands at one time and was given advice that Jobs or Workflow would be the best approach.
Having done something similar with Jobs i thought this would be easy however the jobs are not working as i need info written out to text files and the jobs will not do it. I thought I would attempt to use workflow but nothing is done. It runs and noting happens.
This is merely a small test and i cant get the data. Below is the relevant portion of my code. It runs with no errors but produces no text files.
Thanks
$workfile1 = Get-Content $env:TEMP\worklog1.txt $workfile2 = Get-Content $env:TEMP\worklog2.txt function action1 { foreach ($line1 in $workfile1) { $mypath1 = "\\es01a5901\STU_HOME\$line1" Get-ChildItem $mypath1 | Out-File $env:TEMP\scrap1.txt -Append } } function action2 { foreach ($line2 in $workfile2) { $mypath2 = "\\es02a5902\STU_HOME\$line2" Get-ChildItem $mypath2 | Out-File $env:TEMP\scrap2.txt -Append } } workflow actions { parallel { action1 action2 } }