Invoke-Timeout
SYNOPSIS
{{ Fill in the Synopsis }}
SYNTAX
Invoke-Timeout -Timeout <Int32> -Activity <String> -StatusMessage <String> [-TimeoutScript <ScriptBlock>]
[-CancelScript <ScriptBlock>] [-AllowCancel] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
{{ Fill in the Description }}
EXAMPLES
Example 1
PS C:\> {{ Add example code here }}
{{ Add example description here }}
PARAMETERS
-Activity
The message to write to the console.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AllowCancel
If the timeout is cancellable.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CancelScript
The ScriptBlock to invoke if the timeout was cancelled.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-StatusMessage
The format string to use when writing the status message, must contain a single placeholder for the time left in seconds.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Timeout
The timeout in milliseconds.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-TimeoutScript
The ScriptBlock to invoke when the timeout is reached and wasn't cancelled.
Type: ScriptBlock
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.