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.
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.
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