Close-IvantiTask
SYNOPSIS
Closes a task in Ivanti ITSM.
SYNTAX
RecID (Default)
Close-IvantiTask -ResolvedBy <String> -Resolution <String> -recID <String> [-timeSpent <Int32>] [-closeParent]
[<CommonParameters>]
taskNumber
Close-IvantiTask -ResolvedBy <String> -Resolution <String> -taskNumber <Int32> [-timeSpent <Int32>]
[-closeParent] [<CommonParameters>]
DESCRIPTION
Closes a task in Ivanti ITSM by updating its status to 'Completed' and adding a resolution note. Optionally, it can also close the parent incident if all tasks are completed.
EXAMPLES
EXAMPLE 1
Closes the task with task number 12345, resolved by JohnDoe with the resolution 'Issue resolved'.
EXAMPLE 2
Closes the task with record ID 'abc123', resolved by JohnDoe with the resolution 'Issue resolved'.
EXAMPLE 3
Closes the task with task number 12345 and attempts to close the parent incident if all tasks are completed.
PARAMETERS
-ResolvedBy
The user who resolved the task.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Resolution
The resolution description for the task.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-taskNumber
The task number to be closed.
Type: Int32
Parameter Sets: taskNumber
Aliases: task
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-recID
The record ID of the task to be closed.
Type: String
Parameter Sets: RecID
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-timeSpent
The time spent on the task in minutes. Default is 1 minute.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False
-closeParent
Switch to indicate if the parent incident should be closed if all tasks are completed.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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.