System Center Service Manager 2012 R2 Delete project and reset

Source: Internet
Author: User

People who have used system center service manager should know that SCSM has a large number of workitems, which cannot be deleted by default, and the ID numbers of each project will increase, but as the ID personnel, many of our service requests need to be tested and debugged multiple times. Many projects generated during the test are invalid or useless. The following describes how to delete these invalid projects.


First, install the smlets library on the SCSM server. This Library provides more powershell statements and functions for SCSM.

Download link: http://smlets.codeplex.com/releases/view/84853.


After that, you only need to open the powershell input command to delete related event entries.


Clear events of the incident class:

Import-module smlets
Get-scsmobject-class (get-scsmclass-name system. workitem. Incident $) | remove-scsmobject-force-confirm


Clear changes events:

Import-module smlets
Get-scsmobject-class (get-scsmclass-name system. workitem. changerequest $) | remove-scsmobject-force-confirm


Clear activities events:

Import-module smlets
Get-scsmobject-class (get-scsmclass-name system. workitem. Activity $) | remove-scsmobject-force-confirm


Clear events of the problems class:

Import-module smlets
Get-scsmobject-class (get-scsmclass-name system. workitem. Problem $) | remove-scsmobject-force-confirm


Clear service request events:

Import-module smlets
Get-scsmobject-class (get-scsmclass-name system. workitem. servicerequest $) | remove-scsmobject-force-confirm


The following describes how to reset ID encoding:


First, log on to the Service Manager database:


Enter the following statement:

Select * From autoincrementavailablerange

For example:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/40/09/wKiom1POGpHS5Jv7AAFjG7sw7-M598.jpg "Title =" 868.jpg" alt = "wKiom1POGpHS5Jv7AAFjG7sw7-M598.jpg"/>

It doesn't matter if you don't understand it. Let's enter another one:

Select Mt. typename, MT. managedtypeid, MTP. managedtypepropertyname, MTP. managedtypepropertyid, aiar. firstavailablevalue

From managedtype as Mt, managedtypeproperty as MTP, autoincrementavailablerange as aiar

Where Mt. managedtypeid = aiar. managedtypeid and MTP. managedtypepropertyid = aiar. managedtypepropertyid

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/40/09/wKioL1POHbXB-BavAAC_66JNlfE481.jpg "Title =" 869.jpg" alt = "wKioL1POHbXB-BavAAC_66JNlfE481.jpg"/>

It can be found that the numbers of all projects are actually encoded according to the data in the last row of the table. That is to say, if you want to re-start the Incident ID number from 1, modify it:

Update autoincrementavailablerange

Set firstavailablevalue = 1

Where managedtypeid = 'f59821e2-0364-ed2c-19e3-752efbb1ece9 'and managedtypepropertyid = '28b1c58f-AEFA-A449-7496-4805186BD94F'


Note! To avoid duplicate IDs, you must clear the project with the smlets command above before resetting the data.






This article is from the "absolute field" blog, please be sure to keep this source http://mingwang.blog.51cto.com/1997299/1441414

System Center Service Manager 2012 R2 Delete project and reset

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.