New PowerShell Script to Create a Service Request from an Incident

ITIL v3 defines an incident as “an unplanned interruption to an IT service or a reduction in the quality of an IT service. Failure of a configuration item that has not yet impacted service is also an incident.” A service request is defined as “a request from a user for information, or advice, or for a standard change or for access to an  IT service.”

Sometimes a work item may be initially filed as an incident, but later is determined to really be a service request.  In Service Manager it is not possible to change the type of a work item.  Once an incident is created it will always be an incident.  It cannot be changed to a service request.  To make it easier to create a service request from an existing incident, Andre Carter from Microsoft Australia has created a PowerShell script that creates a new service request from on an existing incident and copies properties of the existing incident into the new service request.  The script will also cancel the incident and create a reference to the newly created service request.

In detail the script performs the following actions:

1.      Copies the incident source to the service request source (e.g. E-Mail, Portal, etc.)

2.      Copies title, description, and urgency from the incident to the service request

3.      Adds a related work item reference to connect the incident and service request

4.      Cancels and closes the incident with a comment that indicates it has been replaced by a service request (with service request ID)

5.      Starts the service request description with “[Formerly Incident #]”

Additional incident properties can easily be added to the list for copy to the new service request by editing the script.

The script can be run manually from a PowerShell prompt or changed to run as a task in the SCSM console. If the script is copied into a task, the $IncID variable shall be set to the current incident.

The script is now shared on the TechNet Gallery: http://gallery.technet.microsoft.com/Create-Incident-from-f19aaea0

Thanks for sharing with the community Andre!