Get-SCSMAnnouncement

Retrieves announcements that are defined in Service Manager.

Syntax

Get-SCSMAnnouncement [-ComputerName <String[]>] [-Credential <PSCredential>] [-DisplayName <String>]
 [-Id <String>] [-Priority <String>] [-SCSession <Connection[]>] [-Title <String>] [<CommonParameters>]

Description

The Get-SCSMAnnouncement cmdlet retrieves announcements that are defined in Service Manager. This includes announcements that have been published and that have expired. You can restrict the results by providing a filter or criteria. Use the Where-Object cmdlet to retrieve only announcements that are active or that have expired. The Title, Id, and Name parameters are additive. If you use the Title and the Id parameters, only those announcements which satisfy both parameters are returned.

Examples

Example 1: Get all announcements

C:\PS>Get-SCSMAmannouncement
TimeAdded                     Title                         Priority                      ExpirationDate
---------                     -----                         --------                      --------------
3/31/2010 6:55:44 PM          Announcement 8                Critical                      3/31/2011 11:55:44 AM
3/31/2010 6:55:44 PM          Announcement 24               Critical                      3/29/2010 12:01:38 PM
3/31/2010 6:55:46 PM          Announcement 75               Low                           3/29/2010 12:01:38 PM
3/31/2010 6:55:46 PM          Announcement 78               Low                           3/31/2011 11:55:46 AM
3/31/2010 6:55:46 PM          Announcement 61               Medium                        3/31/2011 11:55:46 AM
3/31/2010 6:55:46 PM          Announcement 59               Medium                        3/31/2011 11:55:46 AM
3/31/2010 6:55:45 PM          Announcement 33               Medium                        3/31/2011 11:55:45 AM
3/31/2010 6:55:46 PM          Announcement 63               Medium                        3/31/2011 11:55:46 AM
3/31/2010 6:55:44 PM          Announcement 28               Critical                      3/31/2011 11:55:44 AM
3/31/2010 6:55:47 PM          Announcement 99               Low                           3/31/2011 11:55:47 AM

This command retrieves all announcements that are defined in Service Manager.

Example 2: Get announcements for an ID

C:\PS>Get-SCSMAmannouncement -Id "008"
TimeAdded                     Title                         Priority                      ExpirationDate
---------                     -----                         --------                      --------------
3/31/2010 6:55:44 PM          Announcement 8                Critical                      3/31/2011 11:55:44 AM

This command retrieves the announcement in which the ID equals 008.

Example 3: Get announcements for a title

C:\PS>Get-SCSMAmannouncement -Title "33"
TimeAdded                     Title                         Priority                      ExpirationDate
---------                     -----                         --------                      --------------
3/31/2010 6:55:45 PM          Announcement 33               Medium                        3/31/2011 11:55:45 AM

This command retrieves the announcement in which the title equals 33.

Parameters

-ComputerName

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

Type:String[]
Required:False
Position:Named
Default value:Localhost
Accept pipeline input:False
Accept wildcard characters:False
-Credential

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

Type:PSCredential
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

Specifies the display name of an announcement. You can specify a regular expression.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Id

Specifies the ID of the announcement to retrieve.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Priority

Specifies the priority of an announcement. This allows you to retrieve announcements of a specified priority. Allowed values are Medium, Critical, Low, and custom values.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SCSession

Represents the session to the Service Manager server.

Type:Connection[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Title

Specifies the title of the announcement. This parameter accepts a wildcard character.

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

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

System.Announcement.Item

The output of this cmdlet is a list of announcements.