Update-SCSMAnnouncement

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.

パラメーター

-Announcement<EnterpriseManagementInstance[]>

Specifies an instance of an announcement to update.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-PassThru

Specifies the output object that represents the announcement to update. This output object can be passed to other cmdlets.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • Microsoft.EnterpriseManagement.Core.Cmdlets.Instances.EnterpriseManagementInstance

    You can pipe an announcement object to the Announcement parameter.

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • None.

    This cmdlet does not generate any output.

Example 1: Extend the expiration date of an announcement

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"

関連トピック

Get-SCSMAnnouncement

New-SCSMAnnouncement

Remove-SCSMAnnouncement