Manually Remove Incidents, Service Requests, etc. from Service Manager 2012/2012 R2

With System Center Service Manager 2012/2012 R2, you may find you need to delete various Incident Requests, Service Requests before waiting for them to prune out of the database.  This could apply in a testing situation, when you are generating lots of test tickets, etc. (Or if you find you have a Operations Manager alert storm!).  From PowerShell with the Service Manager module loaded, run the following commands:
RemoveInstance
#Remove IR from Database.  Replace IRx with corresponding Incident Request number (ie. IR16, etc.)
Get-SCSMClassInstance -Class (Get-SCSMClass -Name System.WorkItem.Incident) | Where-Object {$_.ID -eq “IRx”} | Remove-SCSMClassInstance
or
#Remove SR from Database.  Replace SRx with corresponding Service Request number (ie. SR16, etc.)
Get-SCSMClassInstance -Class (Get-SCSMClass -Name System.WorkItem.ServiceRequest) | Where-Object {$_.ID -eq “SRx”} | Remove-SCSMClassInstance
RemoveInstance2

Refresh your SCSM Console and it should now be gone from the list.
RemoveInstance3

About AJ McKean

Based in sunny Tauranga, New Zealand, AJ McKean is a Senior Systems Engineer in Mt Maunganui. With over 15 years of professional IT experience working in both New Zealand and the United States, he holds several certifications including MCSE(2000-2003), MCITP:Enterprise(2008), MCSA(2012), VMware VCP-DCV5.5, CompTIA A+ & is an HP Storage Architect. He is passionate about all things IT, especially virtualization, automation & cloud technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *