0

I am stuck at the below task:

I have 5 PowerShell scripts that need to be executed in parallel. I want to create a home.ps1 that will call to other test1.ps1, test2.ps1, test3.ps1,test4.ps1 and test5.ps1 at same time.

1

1 Answer 1

0

You can use jobs for this:

$scripts = 'test1.ps1', 'test2.ps1', 'test3.ps1', 'test4.ps1', 'test5.ps1'

$scripts | ForEach-Object {
  Start-Job -FilePath $_
} | Wait-Job | Receive-Job

More information.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.