Scripts/Restore-SCSMDeletedItem.ps1

1
2
3
4
5
6
7
8
9
10
11
12

[CmdletBinding()]
param (
    [Parameter(Position=0,Mandatory=$true,ValueFromPipeline=$true)] $DeletedObject,
    [Parameter()][Switch]$PassThru,
    [Parameter()][Switch]$whatif
    )
Process
{
    $DeletedObject | set-scsmobject -ph @{ ObjectStatus = "Active" } -whatif:$whatif -passthru:$passthru
}