Get-IvantiIncident
SYNOPSIS
Retrieve an incident from Ivanti ITSM.
SYNTAX
RecID (Default)
Get-IvantiIncident -recID <String> [-customFields <String>] [-top <Int32>] [-status <String>] [-allFields]
[<CommonParameters>]
incidentNumber
Get-IvantiIncident -incidentNumber <Int32> [-customFields <String>] [-top <Int32>] [-status <String>]
[-allFields] [<CommonParameters>]
Filter
Get-IvantiIncident -filter <String> [-customFields <String>] [-top <Int32>] [-status <String>] [-allFields]
[<CommonParameters>]
Search
Get-IvantiIncident -search <String> [-customFields <String>] [-top <Int32>] [-status <String>] [-allFields]
[<CommonParameters>]
Subject
Get-IvantiIncident -subject <String> [-customFields <String>] [-top <Int32>] [-status <String>] [-allFields]
[<CommonParameters>]
DESCRIPTION
The `Get-Incident` function allows you to retrieve an incident from Ivanti ITSM. You can specify the incident using various parameters such as incident number, record ID, filter, search, or subject. The function also allows you to specify custom fields to include in the result and the maximum number of incidents to retrieve.
EXAMPLES
EXAMPLE 1
Retrieves the incident with the incident number 12345.
EXAMPLE 2
Retrieves the incident with the record ID 'abc123'.
EXAMPLE 3
Retrieves incidents created by 'John Doe'.
EXAMPLE 4
Retrieves incidents containing the search string 'urgent'.
EXAMPLE 5
Retrieves incidents with the subject 'Network Issue'.
PARAMETERS
-incidentNumber
The incident number of the incident to retrieve. This parameter is mandatory when using the 'incidentNumber' parameter set.
Type: Int32
Parameter Sets: incidentNumber
Aliases: Incident
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-recID
The record ID of the incident to retrieve. This parameter is mandatory when using the 'RecID' parameter set.
Type: String
Parameter Sets: RecID
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-filter
A filter to apply when retrieving the incident. This parameter is mandatory when using the 'Filter' parameter set.
Type: String
Parameter Sets: Filter
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-search
A search string to apply when retrieving the incident. This parameter is mandatory when using the 'Search' parameter set.
Type: String
Parameter Sets: Search
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-subject
The subject of the incident to retrieve. This parameter is mandatory when using the 'Subject' parameter set.
Type: String
Parameter Sets: Subject
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-customFields
Custom fields to include in the retrieved incident.
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 incidents to retrieve.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-status
The status of the incident to retrieve. Valid values are 'Logged', 'Active', 'Resolved', 'Closed', 'Waiting for Resolution', 'Waiting for Customer', and 'Waiting for 3rd Party'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-allFields
A switch to include all fields in the retrieved incident.
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
This function is useful for retrieving incidents from Ivanti ITSM.
RELATED LINKS
https://docs.microsoft.com/en-us/powershell/scripting/overview