< Back

TaskGroup

Sat Jan 11, 2020 4:11 am

NAME TaskGroup



SYNOPSIS

Autonance DSL container to group maintenance tasks.





SYNTAX

TaskGroup [-Name] <String> [-ScriptBlock] <ScriptBlock> [-Credential <PSCredential>] [<CommonParameters>]



TaskGroup [-Name] <String> [-ScriptBlock] <ScriptBlock> [-Credential <PSCredential>] [-Repeat] [-RepeatCount

<Int32>] [-RepeatCondition <ScriptBlock>] [-RepeatInquire] [<CommonParameters>]





DESCRIPTION

The TaskGroup container is part of the Autonance domain-specific language

(DSL) and is used to group maintenance tasks. Optionally, the tasks within

the group can be repeated in a loop. The loop can have multiple stop options

or will run infinite as long as no exception occurs.





PARAMETERS

-Name <String>

Task group name.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ScriptBlock <ScriptBlock>

Script block containing the grouped tasks.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Credential <PSCredential>

Optionally parameters to use for all maintenance tasks.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Repeat [<SwitchParameter>]

Option to repeat all tasks in the group.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-RepeatCount <Int32>

Number of times to repeat the group. Use 0 for an infinite loop.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-RepeatCondition <ScriptBlock>

Script block to control the repeat loop. Return $true to continue with

the loop. Return $false to stop the loop and continue with the next

maintenance task.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RepeatInquire [<SwitchParameter>]

Option to show a user prompt after each loop, to inquire, if the loop

should continue or stop.



Required? false

Position? named

Default value False

Accept pipeline input? false

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



NOTES





Author : Claudio Spizzi

License : MIT License





RELATED LINKS

https://github.com/claudiospizzi/Autonance