Restore-SCSMDeletedItem

Restore-SCSMDeletedItem

Restores items that were previously marked for deletion in Service Manager.

構文

Parameter Set: Default
Restore-SCSMDeletedItem [-DeletedItem] <EnterpriseManagementInstance[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Restore-SCSMDeletedItem cmdlet restores items that were previously marked for deletion in Service Manager.

パラメーター

-DeletedItem<EnterpriseManagementInstance[]>

Specifies an instance of the deleted item to restore. It is an object returned from the Get-SCSMDeletedItem cmdlet.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

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

true (ByValue)

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

false

-PassThru

Specifies the output object that represents the restored item. 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 a deleted item to the DeletedItem parameter. For example, the object that is returned by the Get-SCSMDeletedItem cmdlet.

出力

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

  • None.

    This cmdlet does not generate any output.

Example 1: Restore a previously deleted item

This command gets the previously marked for deletion item that has the display name Printer7 by using Get-SCSMDeletedItem. The command passes it to the current cmdlet by using the pipeline operator. That command restores the item.

PS C:\>Get-SCSMDeletedItem -DisplayName "Printer7" | Restore-SCSMDeletedItem

Example 2: Restore a previously deleted item and display results

This command gets the previously marked for deletion item that has the display name Printer7 by using Get-SCSMDeletedItem. The command passes it to the current cmdlet by using the pipeline operator. That command restores the item. The command specifies the PassThru parameter. The command returns the restored item.

PS C:\>Get-SCSMDeletedItem -DisplayName "Printer7" | Restore-SCSMDeletedItem -PassThru

関連トピック

Get-SCSMDeletedItem