Skip to content

Get-IvantiTask

SYNOPSIS

Retrieves tasks from Ivanti ITSM.

SYNTAX

RecID (Default)

Get-IvantiTask -recID <String> [-status <String>] [-customFields <String>] [-top <Int32>] [-allFields]
 [<CommonParameters>]

taskNumber

Get-IvantiTask -taskNumber <Int32> [-status <String>] [-customFields <String>] [-top <Int32>] [-allFields]
 [<CommonParameters>]

serviceReqNumber

Get-IvantiTask -serviceReqNumber <Int32> [-status <String>] [-customFields <String>] [-top <Int32>]
 [-allFields] [<CommonParameters>]

incidentNumber

Get-IvantiTask -incidentNumber <Int32> [-status <String>] [-customFields <String>] [-top <Int32>] [-allFields]
 [<CommonParameters>]

changeNumber

Get-IvantiTask -changeNumber <Int32> [-status <String>] [-customFields <String>] [-top <Int32>] [-allFields]
 [<CommonParameters>]

Subject

Get-IvantiTask -subject <String> [-status <String>] [-customFields <String>] [-top <Int32>] [-allFields]
 [<CommonParameters>]

Filter

Get-IvantiTask -filter <String> [-status <String>] [-customFields <String>] [-top <Int32>] [-allFields]
 [<CommonParameters>]
Get-IvantiTask -search <String> [-status <String>] [-customFields <String>] [-top <Int32>] [-allFields]
 [<CommonParameters>]

DESCRIPTION

Retrieves tasks from Ivanti ITSM based on specified parameters such as task number, service request number, incident number, change number, record ID, subject, filter, or search criteria. Allows selecting specific fields and filtering by status.

EXAMPLES

EXAMPLE 1

Get-Task -taskNumber 12345

Retrieves the task with the task number 12345.

EXAMPLE 2

Get-Task -recID 'abc123'

Retrieves the task with the record ID 'abc123'.

EXAMPLE 3

Get-Task -filter "Status eq 'Active'" -status 'Active'

Retrieves active tasks with the specified filter.

EXAMPLE 4

Get-Task -search 'Task123' -allFields

Retrieves the task with the search criteria 'Task123' and returns all fields.

PARAMETERS

-taskNumber

The task number to be retrieved.

Type: Int32
Parameter Sets: taskNumber
Aliases:

Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-serviceReqNumber

The service request number to which the task is related.

Type: Int32
Parameter Sets: serviceReqNumber
Aliases: SR

Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-incidentNumber

The incident number to which the task is related.

Type: Int32
Parameter Sets: incidentNumber
Aliases: Incident

Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-changeNumber

The change number to which the task is related.

Type: Int32
Parameter Sets: changeNumber
Aliases: Change

Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-recID

The record ID of the task to be retrieved.

Type: String
Parameter Sets: RecID
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-subject

The subject of the task to be retrieved.

Type: String
Parameter Sets: Subject
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-filter

The filter criteria to find the task to be retrieved.

Type: String
Parameter Sets: Filter
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The search criteria to find the task to be retrieved.

Type: String
Parameter Sets: Search
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-status

The status of the task.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-customFields

A comma-separated list of custom fields to be included in the result.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-top

The maximum number of results to return.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-allFields

Switch to indicate if all fields should be returned.

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.

INPUTS

OUTPUTS

NOTES