I want to call a Function multiple times, with different parameters, and have it run concurrently.
I’ve tested this by running the two commands below in PowerShell_ISE, and two Powershell sessions open and it runs as expected. But I want to schedule this, I’ve tried having the scheduler call a ps1 file with those commands in it, and nothing. I’ve tried having 2 scheduled Actions with each individual command, and nothing. How can I get these 2 commands run concurrently, or at least not wait until each has completed before calling the next?
Start-Process powershell.exe -ArgumentList "Execute-CrmSync 'cttest'" Start-Process powershell.exe -ArgumentList "Execute-CrmSync 'ctdev'"