Restore-SCSMDeletedItem
Updated: January 14, 2013
Applies To: System Center 2012 - Service Manager, System Center 2012 SP1 - Service Manager
Restore-SCSMDeletedItem
Syntax
Parameter Set: Default Restore-SCSMDeletedItem [-DeletedItem] <EnterpriseManagementInstance[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Restore-SCSMDeleteItem cmdlet restores items that were previously marked for deletion in Service Manager.
Parameters
-DeletedItem<EnterpriseManagementInstance[]>
Specifies an instance of the deleted item to restore. It is an object returned from the Get-SCSMDeletedItem cmdlet.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
true (ByValue) |
|
Accept Wildcard Characters? |
false |
-PassThru
Specifies the output object that represents the restored item. This output object can be passed to other cmdlets.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
named |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before executing the command.
|
Required? |
false |
|
Position? |
named |
|
Default Value |
false |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
|
Required? |
false |
|
Position? |
named |
|
Default Value |
false |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
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 a deleted item to the DeletedItem parameter of the Restore-SCSMDeleteItem cmdlet. For example, the object that is returned by the
Get-SCSMDeletedItemcmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
-
None.
This cmdlet does not generate any output.
Examples
-------------------------- EXAMPLE 1 --------------------------
These commands restore the Printer7 item that was previously marked for deletion. The first command displays the item, and the second command restores that item.
PS C:\>Get-SCSMDeletedItem -DisplayName “Printer7”
Name Class Path
---- ----- ----
\\PrintServer\Printer7 Active Directory Printer
PS C:\>Get-SCSMDeletedItem -DisplayName “Printer7”|Restore-SCSMDeletedItem
-------------------------- EXAMPLE 2 --------------------------
This command restores an item which was previously marked for deletion and displays the item that has just been restored.
PS C:\>Get-SCSMDeletedItem -DisplayName “Printer7”|Restore-SCSMDeletedItem -pass
UNCName PrinterName Description Location
------- ----------- ----------- --------
\\PrintServer\Printer7 Printer7 Seattle
