PForEach.dll-Help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <!-- Cmdlet: Invoke-ForEachParallel --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Invoke-ForEachParallel</command:name> <command:verb>Invoke</command:verb> <command:noun>ForEachParallel</command:noun> <maml:description> <maml:para>ForEach-Object parallel version. This is one more attempt to make parallel script execution easier.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This cmdlet runs script block of Process param in parallel using multiple runspaces</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Invoke-ForEachParallel</maml:name> <!-- Parameter: Process --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Process</maml:name> <maml:description> <maml:para>Specifies the operation that is performed on each input object</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Begin --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Begin</maml:name> <maml:description> <maml:para>Specifies a script block that runs before this cmdlet processes any input objects.</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: End --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>End</maml:name> <maml:description> <maml:para>Specifies a script block that runs after this cmdlet processes all input objects.</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: InputObject --> <command:parameter required="false" globbing="false" pipelineInput="true (ByValue)" position="named"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>Specifies the input objects. The script block will be executed on each object in parallel</maml:para> </maml:description> <command:parameterValue required="true">PSObject</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.PSObject</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ThreadUnsafe --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ThreadUnsafe</maml:name> <maml:description> <maml:para>Indicates wheither live objects or cli copies will be used</maml:para> <maml:para>Copies are safer, but have limited functionality</maml:para> <maml:para>Live objects have full functionality, however they should be treated with respect to concurrent access</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: ThrottleLimit --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ThrottleLimit</maml:name> <maml:description> <maml:para>Sets maximum number of runspaces being created.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>2</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: InputObject --> <command:parameter required="false" globbing="false" pipelineInput="true (ByValue)" position="named"> <maml:name>InputObject</maml:name> <maml:description> <maml:para>Specifies the input objects. The script block will be executed on each object in parallel</maml:para> </maml:description> <command:parameterValue required="true">PSObject</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.PSObject</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Process --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Process</maml:name> <maml:description> <maml:para>Specifies the operation that is performed on each input object</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Begin --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Begin</maml:name> <maml:description> <maml:para>Specifies a script block that runs before this cmdlet processes any input objects.</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: End --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>End</maml:name> <maml:description> <maml:para>Specifies a script block that runs after this cmdlet processes all input objects.</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ThrottleLimit --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ThrottleLimit</maml:name> <maml:description> <maml:para>Sets maximum number of runspaces being created.</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>2</dev:defaultValue> </command:parameter> <!-- Parameter: ThreadUnsafe --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ThreadUnsafe</maml:name> <maml:description> <maml:para>Indicates wheither live objects or cli copies will be used</maml:para> <maml:para>Copies are safer, but have limited functionality</maml:para> <maml:para>Live objects have full functionality, however they should be treated with respect to concurrent access</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.Management.Automation.PSObject</maml:name> <maml:uri /> </dev:type> <maml:description> <maml:para>Specifies the input objects. The script block will be executed on each object in parallel</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues /> <command:examples> <command:example> <maml:title>---------- EXAMPLE 1 ----------</maml:title> <maml:introduction> <maml:para>Very simple example</maml:para> <maml:para>1..5|%%{$_}</maml:para> <maml:para>Number from 1-5 will be displayed in rundom sequence. %% is alias of this cmdlet</maml:para> </maml:introduction> </command:example> <command:example> <maml:title>---------- EXAMPLE 2 ----------</maml:title> <maml:introduction> <maml:para>Generate hash of files in c:\temp</maml:para> <maml:para>ls -Recurse C:\Temp\|%% {Get-FileHash -Path $_.FullName}</maml:para> <maml:para>Generate files' hash in parallel. Depending on files' number and size, execution time can be bigger or less than traditional ForEach-Object</maml:para> </maml:introduction> </command:example> </command:examples> </command:command> </helpItems> |