Update-SCSMAnnouncement
Updates the properties of an announcement for Service Manager.
Parameter Set: Default
Update-SCSMAnnouncement [-Announcement] <EnterpriseManagementInstance[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
The Update-SCSMAnnouncement cmdlet updates the properties of an announcement in Service Manager.
Specifies an instance of an announcement to update.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
Indicates that this cmdlet returns the announcement that it updates. You can pass this object to other cmdlets.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
The input type is the type of the objects that you can pipe to the cmdlet.
Microsoft.EnterpriseManagement.Core.Cmdlets.Instances.EnterpriseManagementInstance
You can pipe an announcement object to the Announcement parameter.
The output type is the type of the objects that the cmdlet emits.
None.
This cmdlet does not generate any output.
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.
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"