Monday, April 16, 2018

System Center remove all Incdents

After testing fresh installed server  to remove all test incidents use SMLets:

install SMLets.msi

run powershell as Administrator

Import-Module SMLets

$IRClass = Get-scsmclass System.WorkItem.Incident$
$IRsList = Get-SCSMObject -Class $IRClass 

Foreach ($IR in $IRsList) { 
     Remove-SCSMObject $IR -Confirm:$False -Force
}

No comments: