From 176bc310eec2bf373c975d1abe96439d6c6fcc76 Mon Sep 17 00:00:00 2001 From: freedbygrace Date: Fri, 20 Oct 2023 14:22:15 -0400 Subject: [PATCH] Update README.md --- README.md | 66 +++++++++++++++---------------------------------------- 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index ecaffcf..7bc20e8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +--- +external help file: -help.xml +Module Name: +online version: +schema: 2.0.0 +--- + # Invoke-PSThread ## SYNOPSIS @@ -9,19 +16,19 @@ Enables the ability to leverage multithreading within powershell whilst reducing ### Runspace (Default) ``` -Invoke-PSThread -RunspaceDefinition [-ApartmentState ] [-AssemblyList ] [-Confirm ] [-ContinueOnError ] [-FunctionList ] [-ModuleList ] [-Runspace ] [-RunspaceParameters ] [-SynchronizedHashtable ] [-ThreadOption ] [-VariableList ] [-WaitForAvailableRunspace ] [-WhatIf ] [] +Invoke-PSThread -RunspaceDefinition [-ApartmentState ] [-AssemblyList ] [-ContinueOnError ] [-FunctionList ] [-ModuleList ] [-Runspace ] [-RunspaceParameters ] [-SynchronizedHashtable ] [-ThreadOption ] [-VariableList ] [-WaitForAvailableRunspace ] [] ``` ### RunspacePool ``` -Invoke-PSThread -InputObjectList -RunspaceDefinition [-ApartmentState ] [-AssemblyList ] [-Confirm ] [-ContinueOnError ] [-FunctionList ] [-MaximumRunspaces ] [-ModuleList ] [-RunspaceParameters ] [-RunspacePool ] [-SynchronizedHashtable ] [-ThreadOption ] [-VariableList ] [-WaitForAvailableRunspace ] [-WhatIf ] [] +Invoke-PSThread -InputObjectList -RunspaceDefinition [-ApartmentState ] [-AssemblyList ] [-ContinueOnError ] [-FunctionList ] [-MaximumRunspaces ] [-ModuleList ] [-RunspaceParameters ] [-RunspacePool ] [-SynchronizedHashtable ] [-ThreadOption ] [-VariableList ] [-WaitForAvailableRunspace ] [] ``` ### Await ``` -Invoke-PSThread -ThreadList [-Await ] [-Confirm ] [-ContinueOnError ] [-LoopDuration ] [-LoopTimeout ] [-WaitForAvailableRunspace ] [-WhatIf ] [] +Invoke-PSThread -ThreadList [-Await ] [-ContinueOnError ] [-LoopDuration ] [-LoopTimeout ] [-WaitForAvailableRunspace ] [] ``` ## DESCRIPTION @@ -32,10 +39,10 @@ See the fully working examples below. ## EXAMPLES -### Example 1 +### Example 1: EXAMPLE 1 -Create a runspace +Create a runspace. ``` [ScriptBlock]$RunspaceDefinition = { @@ -156,7 +163,6 @@ Write-Output -InputObject ($InvokePSThreadResult) Create a runspace pool, submit all jobs to the pool, and the pool will manage their execution. The function will be executed a second time to wait until all jobs have been completed, return their output, and cleanup. - ``` [ScriptBlock]$RunspaceDefinition = { Param @@ -284,24 +290,6 @@ Accept wildcard characters: False DontShow: False ``` -### -Confirm - -{{ Fill Confirm Description }} - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf -Accepted values: - -Required: True (None) False (All) -Position: Named -Default value: -Accept pipeline input: False -Accept wildcard characters: False -DontShow: False -``` - ### -ContinueOnError Ignore errors. @@ -596,24 +584,6 @@ Accept wildcard characters: False DontShow: False ``` -### -WhatIf - -{{ Fill WhatIf Description }} - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi -Accepted values: - -Required: True (None) False (All) -Position: Named -Default value: -Accept pipeline input: False -Accept wildcard characters: False -DontShow: False -``` - ### CommonParameters @@ -626,14 +596,14 @@ Any useful tidbits ## RELATED LINKS -[] (https://davewyatt.wordpress.com/2014/04/29/more-potential-use-cases-for-thread-safe-variable-access-in-powershell-events/) +(https://davewyatt.wordpress.com/2014/04/29/more-potential-use-cases-for-thread-safe-variable-access-in-powershell-events/) -[] (https://davewyatt.wordpress.com/2014/04/29/more-potential-use-cases-for-thread-safe-variable-access-in-powershell-events/) +(https://davewyatt.wordpress.com/2014/04/29/more-potential-use-cases-for-thread-safe-variable-access-in-powershell-events/) -[] (https://www.codeproject.com/Tips/895840/Multi-Threaded-PowerShell-Cookbook) +(https://www.codeproject.com/Tips/895840/Multi-Threaded-PowerShell-Cookbook) -[] (https://www.linkedin.com/pulse/multithreading-powershell-scripts-alexey/) +(https://www.linkedin.com/pulse/multithreading-powershell-scripts-alexey/) -[] (https://xkln.net/blog/multithreading-in-powershell--running-a-specific-number-of-threads/) +(https://xkln.net/blog/multithreading-in-powershell--running-a-specific-number-of-threads/) -[] (https://markw.dev/#:~:text=There%20are%20two%20ways%20we,other%20is%20by%20using%20splatting.&text=The%20important%20part%20here%20is,plural)%20instead%20of%20AddParameter()%20.) +(https://markw.dev/#:~:text=There%20are%20two%20ways%20we,other%20is%20by%20using%20splatting.&text=The%20important%20part%20here%20is,plural)%20instead%20of%20AddParameter()%20.)