You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PSParallelPipeline.psd1
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
RootModule='PSParallelPipeline.psm1'
13
13
14
14
# Version number of this module.
15
-
ModuleVersion='1.0.0'
15
+
ModuleVersion='1.0.1'
16
16
17
17
# Supported PSEditions
18
18
# CompatiblePSEditions = @()
@@ -78,7 +78,7 @@ CmdletsToExport = @()
78
78
VariablesToExport=@()
79
79
80
80
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
81
-
AliasesToExport=@('parallel')
81
+
AliasesToExport=@('parallel','parallelpipeline')
82
82
83
83
# DSC resources to export from this module
84
84
# DscResourcesToExport = @()
@@ -95,7 +95,7 @@ PrivateData = @{
95
95
PSData=@{
96
96
97
97
# Tags applied to this module. These help with module discovery in online galleries.
Copy file name to clipboardExpand all lines: PSParallelPipeline.psm1
+28-24Lines changed: 28 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,9 @@ function Invoke-Parallel {
10
10
Enables parallel processing of pipeline input objects.
11
11
12
12
.DESCRIPTION
13
-
PowerShell function that intends to emulate `ForEach-Object -Parallel` functionality in PowerShell Core for those stuck with Windows PowerShell.
13
+
PowerShell function that intends to emulate [`ForEach-Object -Parallel`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/foreach-object?view=powershell-7.2#-parallel) for those stuck with Windows PowerShell.
14
14
This function shares similar usage and capabilities than the ones available in the built-in cmdlet.
15
-
This was inspired by RamblingCookieMonster's [`Invoke-Parallel`](https://github.com/RamblingCookieMonster/Invoke-Parallel) and Boe Prox's [`PoshRSJob`](https://github.com/proxb/PoshRSJob)
16
-
and is merely a simplified take on those.
15
+
This project is greatly inspired by RamblingCookieMonster's [`Invoke-Parallel`](https://github.com/RamblingCookieMonster/Invoke-Parallel) and Boe Prox's [`PoshRSJob`](https://github.com/proxb/PoshRSJob) and is merely a simplified take on those with some few improvements.
17
16
18
17
TO DO:
19
18
- Add `-TimeoutSeconds` parameter.
@@ -31,17 +30,19 @@ function Invoke-Parallel {
31
30
Input objects are blocked until the running script block count falls below the ThrottleLimit.
32
31
The default value is `5`.
33
32
34
-
.PARAMETERArgumentList
35
-
Specifies a hashtable of values to be passed to the Runspaces.
36
-
Hashtable Keys become the Variable Name inside the ScriptBlock.
33
+
.PARAMETERVariables
34
+
Specifies a hash table of variables to have available in the Script Block (Runspaces).
35
+
The hash table `Keys` become the Variable Name inside the Script Block.
36
+
37
+
.PARAMETERFunctions
38
+
Existing functions in the Local Session to have available in the Script Block (Runspaces).
37
39
38
40
.PARAMETERThreadOptions
39
41
These options control whether a new thread is created when a command is executed within a Runspace.
40
-
See [`PSThreadOptions` Enum](https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.runspaces.psthreadoptions?view=powershellsdk-7.2.0).
42
+
This parameter is limited to `ReuseThread` and `UseNewThread`.
41
43
Default value is `ReuseThread`.
44
+
See [`PSThreadOptions` Enum](https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.runspaces.psthreadoptions?view=powershellsdk-7.2.0) for details.
42
45
43
-
.PARAMETERFunctions
44
-
Existing functions in the current scope that we want to have available in the Runspaces.
PowerShell function that intends to emulate `ForEach-Object -Parallel` functionality in PowerShell Core for those stuck with Windows PowerShell. This function shares similar usage and capabilities than the ones available in the built-in cmdlet.
16
+
PowerShell function that intends to emulate [`ForEach-Object -Parallel`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/foreach-object?view=powershell-7.2#-parallel) for those stuck with Windows PowerShell. This function shares similar usage and capabilities than the ones available in the built-in cmdlet.
17
17
18
-
This was inspired by RamblingCookieMonster's [`Invoke-Parallel`](https://github.com/RamblingCookieMonster/Invoke-Parallel) and Boe Prox's [`PoshRSJob`](https://github.com/proxb/PoshRSJob) and is merely a simplified take on those.
18
+
This project is greatly inspired by RamblingCookieMonster's [`Invoke-Parallel`](https://github.com/RamblingCookieMonster/Invoke-Parallel) and Boe Prox's [`PoshRSJob`](https://github.com/proxb/PoshRSJob) and is merely a simplified take on those with some few improvements.
19
19
20
20
## REQUIREMENTS
21
21
@@ -40,15 +40,15 @@ $message = 'Hello world from {0}'
40
40
} -ThrottleLimit 3
41
41
```
42
42
43
-
### EXAMPLE 2: Same as previous example but with `-ArgumentList` parameter
43
+
### EXAMPLE 2: Same as previous example but with `-Variables` parameter
These options control whether a new thread is created when a command is executed within a Runspace.
160
-
See [`PSThreadOptions` Enum](https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.runspaces.psthreadoptions?view=powershellsdk-7.2.0).
161
-
Default value is `ReuseThread`.
162
+
### -Functions
163
+
164
+
Existing functions in the Local Session to have available in the Script Block (Runspaces).
Existing functions in the current scope that we want to have available in the Runspaces.
178
+
### -ThreadOptions
179
+
180
+
These options control whether a new thread is created when a command is executed within a Runspace.
181
+
<br>This parameter is limited to `ReuseThread` and `UseNewThread`. Default value is `ReuseThread`.
182
+
<br>See [PSThreadOptions Enum](https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.runspaces.psthreadoptions?view=powershellsdk-7.2.0) for details.
0 commit comments