Skip to content

Get-IvantiAnnouncement

SYNOPSIS

Retrieve an announcement from Ivanti ITSM.

SYNTAX

RecID (Default)

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

Filter

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

Subject

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

DESCRIPTION

The `Get-Announcement` function allows you to retrieve an announcement from Ivanti ITSM. You can specify the announcement using various parameters such as announcement 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 announcements to retrieve.

EXAMPLES

EXAMPLE 1

Get-Announcement -recID 'abc123'

Retrieves the announcement with the record ID 'abc123'.

EXAMPLE 2

Get-Announcement -filter "CreatedBy eq 'John Doe'"

Retrieves announcements created by 'John Doe'.

EXAMPLE 3

Get-Announcement -search 'urgent'

Retrieves announcements containing the search string 'urgent'.

EXAMPLE 4

Get-Announcement -subject 'Network Issue'

Retrieves announcements with the subject 'Network Issue'.

EXAMPLE 5

Get-Announcement -filter 'EffectiveDate gt 2025-04-13T00:00:00Z and ExpirationDate lt 2025-04-20T00:00:00Z' -customFields 'customfield1,customfield2,customfield3,customfield4'

Retrieves announcements with an effective date after April 13, 2025, and an expiration date before April 20, 2025.

Includes custom fields

PARAMETERS

-recID

The record ID of the announcement 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 announcement. 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

A search string to apply when retrieving the announcement. 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 announcement 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 announcement.

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 announcements 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 announcement 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 announcement.

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 announcements from Ivanti