Share via


Update-SCSMAnnouncement

Updates the properties of an announcement for Service Manager.

Syntax

Default (Default)

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

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

-PassThru

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

Parameter properties

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

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 object to the Announcement parameter.

Outputs

None.

This cmdlet does not generate any output.