Remove-SCSMAnnouncement

Removes an announcement from Service Manager.

Syntax

Remove-SCSMAnnouncement [-Announcement] <EnterpriseManagementInstance[]> [-Confirm] [-WhatIf]
 [<CommonParameters>]

Description

The Remove-SCSMAnnouncement cmdlet removes an announcement from Service Manager.

Examples

Example 1: Remove announcements by using a title

C:\PS>Get-SCSMAnnouncement | Where-Object { $_.title -match "labor day" } | Remove-SCSMAnnouncement

This command removes all announcements with a title that matches the string labor day. The command uses the Get-SCSMAnnouncement cmdlet to get all announcement instances. The command passes the results to the Where-Object cmdlet, which passes on only those that have titles that match the specified string. The current cmdlet removes those announcements.

Parameters

-Announcement

Specifies instances of announcements. To obtain an instance, use the Get-SCSMAnnouncement cmdlet.

Type:EnterpriseManagementInstance[]
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.EnterpriseManagement.Core.Cmdlets.Instances.EnterpriseManagementInstance

You can pipe an announcement to the *Announcement* parameter.

Outputs

None.

This cmdlet does not generate any output.