Update-SCSMAnnouncement

Updates the properties of an announcement for Service Manager.

Syntax

Update-SCSMAnnouncement [-Announcement] <EnterpriseManagementInstance[]> [-Confirm] [-PassThru] [-WhatIf]
 [<CommonParameters>]

Description

The Update-SCSMAnnouncement cmdlet updates the properties of an announcement in Service Manager.

Examples

Example 1: Extend the expiration date of an announcement

PS C:\>$Announcement = Get-SCSMAnnouncement -Title "33"
PS C:\> $Announcement.ExpirationDate = ([datetime]::Now.AddMonths(6))
PS C:\> Update-SCSMAnnouncement -Announcement $announcement
PS C:\> Get-SCSMAnnouncement -Title "33"
TimeAdded            Title            Priority  ExpirationDate
---------            -----            --------  --------------
3/31/2010 6:55:45 PM Announcement 33  Medium    3/31/2011 11:55:45 AM

The first command gets an announcement titled 33 by using the Get-SCSMAnnouncement cmdlet. The command stores that announcement in the $Announcement variable.

The second command uses standard dot syntax to assign a new value to the ExpirationDate property of $Announcement. The new value is six months in the future.

The third command updates the announcement to be the current value of $Announcement.

The final command displays the value of the announcement titled 33 to very your changes.

Parameters

-Announcement

Specifies an instance of an announcement to update.

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
-PassThru

Indicates that this cmdlet returns the announcement that it updates. You can pass this object to other cmdlets.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
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 object to the *Announcement* parameter.

Outputs

None.

This cmdlet does not generate any output.