Share via


Remove-SCSMAnnouncement

Removes an announcement from Service Manager.

Syntax

Default (Default)

Remove-SCSMAnnouncement
    [-Announcement] <EnterpriseManagementInstance[]>
    [-WhatIf]
    [-Confirm]
    [<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.

Parameter properties

Type:

Microsoft.EnterpriseManagement.Core.Cmdlets.Instances.EnterpriseManagementInstance[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

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.