Skip to main content
Made it fit the question better
Source Link
Oll
  • 342
  • 4
  • 16

There is a new built-in solution in PowerShell 7.0 Preview 3. PowerShell ForEach-Object Parallel Feature

So you could do:

Get-ChildItem $dir | ForEach-Object -Parallel {

.. Do Work
 $_ # this will be your file

}-ThrottleLimit 4

There is a new built-in solution in PowerShell 7.0 Preview 3. PowerShell ForEach-Object Parallel Feature

So you could do:

Get-ChildItem $dir | ForEach-Object -Parallel {

 $_ # this will be your file

}-ThrottleLimit 4

There is a new built-in solution in PowerShell 7.0 Preview 3. PowerShell ForEach-Object Parallel Feature

So you could do:

Get-ChildItem $dir | ForEach-Object -Parallel {

.. Do Work
 $_ # this will be your file

}-ThrottleLimit 4
Source Link
Oll
  • 342
  • 4
  • 16

There is a new built-in solution in PowerShell 7.0 Preview 3. PowerShell ForEach-Object Parallel Feature

So you could do:

Get-ChildItem $dir | ForEach-Object -Parallel {

 $_ # this will be your file

}-ThrottleLimit 4