< Back
Invoke-ScriptBlockOverArrays
Post
NAME Invoke-ScriptBlockOverArrays
SYNOPSIS
Invokes a script block on each member of the array.
SYNTAX
Invoke-ScriptBlockOverArrays [-InputArray] <Object[]> [-CodeToRun] <ScriptBlock> [[-CanSkipCode] <ScriptBlock>]
[[-TaskName] <String>] [<CommonParameters>]
DESCRIPTION
Invokes a script block on each member of the array.
PARAMETERS
-InputArray <Object[]>
Array that contains the records to process.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-CodeToRun <ScriptBlock>
Script block to execute.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-CanSkipCode <ScriptBlock>
(Optional) Script block to check if this row can be skipped.
Required? false
Position? 3
Default value {}
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-TaskName <String>
(Optional) Name of Task to use in Progress bar.
Required? false
Position? 4
Default value Invoke-ScriptBlockOverArrays
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
The Results Object with 4 Components
success - array of success objects
skipped - array of failed objects
errors - array of error objects
timing - timing information for the operation
NOTES
AUTHOR: Cyrus Jamula
LASTEDIT: March 20th, 2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Look at Expand-UserForMultipleRecurrences as an example.
RELATED LINKS
Get-CommonParameterValues
SYNOPSIS
Invokes a script block on each member of the array.
SYNTAX
Invoke-ScriptBlockOverArrays [-InputArray] <Object[]> [-CodeToRun] <ScriptBlock> [[-CanSkipCode] <ScriptBlock>]
[[-TaskName] <String>] [<CommonParameters>]
DESCRIPTION
Invokes a script block on each member of the array.
PARAMETERS
-InputArray <Object[]>
Array that contains the records to process.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-CodeToRun <ScriptBlock>
Script block to execute.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-CanSkipCode <ScriptBlock>
(Optional) Script block to check if this row can be skipped.
Required? false
Position? 3
Default value {}
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-TaskName <String>
(Optional) Name of Task to use in Progress bar.
Required? false
Position? 4
Default value Invoke-ScriptBlockOverArrays
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
The Results Object with 4 Components
success - array of success objects
skipped - array of failed objects
errors - array of error objects
timing - timing information for the operation
NOTES
AUTHOR: Cyrus Jamula
LASTEDIT: March 20th, 2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Look at Expand-UserForMultipleRecurrences as an example.
RELATED LINKS
Get-CommonParameterValues