DataGen/Remove-DemoData.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
param ( [switch]$whatif, [switch]$verbose )
"NOT READY YET"
EXIT
$classes = "^System.WorkItem.ChangeRequest$",
    "^Microsoft.AD.User$",
    "^System.SoftwareItem$",
    "^System.SoftwareUpdate$",
    "^Microsoft.AD.Printer$",
    "^Microsoft.Windows.Computer$",
    "^System.WorkItem.ReleaseRecord$",
    "^System.WorkItem.Incident$",
    "^Microsoft.SystemCenter.BusinessService$",
    "^System.WorkItem.Problem$",
    "^System.Knowledge.Article$",
    "^System.WorkItem.Problem$",
    "^System.WorkItem.Activity$"

$GetArgs = @{
    Whatif = $Whatif
    Verbose = $verbose
    }
$classes | %{
    if ( $_ -eq "Microsoft.AD.User" )
    {
        $GetArgsfilter = ""
    }
    else if ( $_ -eq "Microsoft.Windows.Computer" )
    {
    }
    get-scsmclass $_ | 
        get-scsmobject | 
        remove-scsmobject -for -whatif:$whatif -verbose:$verbose
    }