@@ -88,13 +88,48 @@ at contains the objects, or type a command or expression that gets the objects.<
88
88
</maml : description >
89
89
<command : parameterValue required =" true" variableLength =" false" >PSObject</command : parameterValue >
90
90
</command : parameter >
91
- <command : parameter required =" false" variableLength =" false" globbing =" false" pipelineInput =" false" position =" named" aliases =" " >
91
+ </command : syntaxItem >
92
+ <command : syntaxItem >
93
+ <maml : name >Invoke-Parallel</maml : name >
94
+ <command : parameter required =" true" pipelineinput =" false" globbing =" false" position =" named" >
95
+ <maml : name >ScriptBlock</maml : name >
96
+ <maml : description >
97
+ <maml : para >Specifies the operation that is performed on each input object. Enter a script block that describes the operation.</maml : para >
98
+ </maml : description >
99
+ <command : parameterValue required =" true" >ScriptBlock</command : parameterValue >
100
+ </command : parameter >
101
+ <command : parameter required =" false" pipelineinput =" false" globbing =" false" position =" named" >
102
+ <maml : name >ThrottleLimit</maml : name >
103
+ <maml : description >
104
+ <maml : para >Specifies the maximum number of concurrent connections that can be established to run this command. If you omit this
105
+ parameter or enter a value of 0, the default value, 16, is used.</maml : para >
106
+ </maml : description >
107
+ <command : parameterValue required =" false" >Int32</command : parameterValue >
108
+ </command : parameter >
109
+ <command : parameter required =" true" pipelineinput =" True (ByValue)" globbing =" false" position =" named" >
110
+ <maml : name >InputObject</maml : name >
111
+ <maml : description >
112
+ <maml : para >Specifies the input objects. Invoke-Parallel runs the script block on each input object in parallel. Enter a variable th
113
+ at contains the objects, or type a command or expression that gets the objects.</maml : para >
114
+ </maml : description >
115
+ <command : parameterValue required =" true" >PSObject</command : parameterValue >
116
+ </command : parameter >
117
+ <command : parameter required =" false" pipelineinput =" false" globbing =" false" position =" named" >
92
118
<maml : name >NoProgress</maml : name >
93
119
<maml : description >
94
120
<maml : para >Will not show progress from Invoke-Progress. Progress from the scriptblock will still be displayed.</maml : para >
95
121
</maml : description >
96
- <command : parameterValue required =" false" variableLength =" false" >SwitchParameter</command : parameterValue >
97
- <dev : defaultValue />
122
+ <command : parameterValue required =" false" >SwitchParameter</command : parameterValue >
123
+ </command : parameter >
124
+ <command : parameter required =" true" pipelineinput =" false" globbing =" false" position =" named" >
125
+ <maml : name >InitialSessionState</maml : name >
126
+ <maml : description >
127
+ <maml : para >The session state used by the runspaces when invoking ScriptBlock. This provides the functions, variables, drives, etc
128
+ available to the ScriptBlock.
129
+ By default, InitialSessionState.Create2() is used and the functions and variables from the current scope is then
130
+ imported.</maml : para >
131
+ </maml : description >
132
+ <command : parameterValue required =" true" >InitialSessionState</command : parameterValue >
98
133
</command : parameter >
99
134
</command : syntaxItem >
100
135
</command : syntax >
@@ -204,6 +239,14 @@ imported.</maml:para>
204
239
</dev : type >
205
240
<dev : defaultValue />
206
241
</command : parameter >
242
+ <command : parameter required =" false" globbing =" false" pipelineInput =" false" position =" named" >
243
+ <maml : name >Parameter8</maml : name >
244
+ <maml : description >
245
+ <maml : para />
246
+ </maml : description >
247
+ <command : parameterValue required =" false" />
248
+ <dev : defaultValue />
249
+ </command : parameter >
207
250
</command : parameters >
208
251
<command : inputTypes >
209
252
<!-- Inputs-->
@@ -233,10 +276,11 @@ imported.</maml:para>
233
276
<maml : introduction >
234
277
<maml : para >PS C:\> </maml : para >
235
278
</maml : introduction >
236
- <dev : code >(1..255).ForEach{" 192.168.0.$_" } | Invoke-Parallel {$ip = $_; $res = ping.exe -4 -w 20 $_; [PSCustomObject] @{IP=$ip;Res=$res}} -ThrottleLimit 64</dev : code >
279
+ <dev : code >(1..255).ForEach{" 192.168.0.$_" } |
280
+ Invoke-Parallel {$ip = [IPAddress]$_; $res = ping.exe -n 1 -4 -w 20 -a $_; [PSCustomObject] @{IP=$ip;Res=$res}} -ThrottleLimit 64</dev : code >
237
281
<dev : remarks >
238
- <maml : para >This example pings all iP v4 addresses on a subnet, specifying Throttlelimit to 64, i.e. running up to 64 runspaces in p
239
- arallel .</maml : para >
282
+ <maml : para >This example pings all iP v4 addresses on a subnet, specifying Throttlelimit to 64, i.e. running up to 64 runspaces
283
+ in parallel .</maml : para >
240
284
</dev : remarks >
241
285
</command : example >
242
286
</command : examples >
0 commit comments