Tag Archives: SCSM

SCSM workflow to add UserInput to work item description

I often get the question from customers that are using SCSM how can we get the user input to the description. Out-of-the-box SCSM will place this in a field called UserInput.

This can be frustrating for some customers because they want to be able to send out an email like this”your request is now registered with the following information”. We would just use the normal email templates and add UserInput it would look something like this.

This is not a very good formatting to use in a email to the end-user. Therefor i have created a SCSM PowerShell workflow that will check for all new SR and IR if they contain any UserInput and if it does it will add that to the description. If there already is a description the UserInput will be added below that text. So if we look at the example a before it will look like this instead.

Now this is much better for an end-user to read. The solution will take all the questions on every request offering there is in the system and add it to the description. The solution is not sealed so feel free to modify the code to fit your need.

Below is a code snip from the service request part where i will explain what i am doing.

First we get the service request object so we have something to work with.

Save the UserInput to a variable

We need an array to save all the question with answers so we call that one $UserInput and we have to check if there is a description already. If it is save it to the userinput array.

The next step is to go throw the Questions in the XML-code. We are doing a split to get each question/answer to a row and then go row to row and extract the information we need. And save the question with answers to the array  $userinput

The last step is to add all information saved in $userinput to the description on the work item.

Tip: If you want to send out an email with your case is now registered in our system i recommend to modify this workflow some. Make the workflow set a tag in the SR class for example and when that value is met you can trigger a new workflow to send out an email.

Why should i do this? If you have an email subscription with criteria send on object created the email can be sent before the user input workflow has run and you don’t get a complete description to the end-user.

This function is not excessive tested so it’s up to you to test it and find possible bugs. The full code is available at Technet gallery, Click here for a link


SCSM: Update child incidents with parent ID in the title using PowerShell

Here is a small post i wanted to share.

A customer wanted a easy way to see if a incident is related to a parent incident without having to go into the case. They are using the Cireson Portal and the portal does not show if an Incident is a child unless you go into the Incident (See picture below).

So in order to make a quick fix that does not require Cireson to make changes to the portal i created a PowerShell script that will look for active parent incidents and go into each child and update the title so it says <title> (Child object of IR213) for example (See picture below).

The script is pretty simple done and it might generate performance loss if you schedule it on a fast interval. But that’s up to you to decide what interval the script should run at.

The script


Working with Cireson Portal instead of SCSM Console

This is my own thoughts not from my employer or from Cireson.


This post is my own thoughts about Cireson Portal and real life experience from different customers around in Sweden that have replaced the Service Manager Console and only using the portal to do it’s day-to-day work.

We all know that the Console of Service Manager is probably the most negative about the product because it’s slow and does not work well in terminal environments for example Citrix due to high resource use.

Now the Cireson Portal is a HTML5 based portal with it’s own database that caches the work items from Service Manager to that database in order to provide as fast rendering of webpages as possible. This solution works great but it comes with a few limitations. Because it’s using an own database not all information that is stored in the normal service manger database does exists in the Cireson database, but this should not be a problem for most users.



If you have worked with Azure before you can see that the looks are similar, this is a good design choice but the placement of the buttons for Save, Apply, Cancel might not be the best place. Users


The first things customers always wants in a ITSM tool is to modify the forms to fit the company need. In SCSM you had Authoring Tool and to be honest it’s not that good of a tool. It crashes a lot and you needed to clean the XML-files after you where done.

Now in the portal Cireson has implemented a clever way of doing this and making it really simple for someone without much coding experience to do it.

This code snippet is taken from the Incident form. You have to create a Incident.js and place it in the customspace folder to apply your own customization to the portal. All this customization are passed on between portal upgrades also.

I wont go into detail here but if i wanted to remove the Impact field i would just remove the line. If i didn’t want it to be a required field i just change required: true to false. It’s just that easy on form modifications for Service Request, Change Request, Release Request, Incident Request and Service Requests.


The downside about customization’s here is that you cannot modify a activity form (Review, Manual etc) They are locked in this look for the moment. My hope is that Cireson will allow us to modify even those form so we can remove/add forms/fields we feel are necessary.


Service Catalog

If you have a good service catalog already in SCSM the catalog will just show in this portal without any modifications. The offerings do however still have the same limitations as before, we can’t create dynamic questions and so on. But it’s prettier then the old ugly SharePoint portal. And you can do some customization here also. How big the icons should be etc.



Cireson added some dashboard support a few releases ago. It comes out-of-the-box with some predefined dashboards. Now they do give a fairly good overview but it might not fit all organisations. You can create your own dashboard but at the moment of this post it’s not easy at all. It requires good SQL knowledge and more.

However Cireson has told us that they will release a admin interface for this in the future.



Other nice stuff

There are lots of functions in the portal and i wont write them all down here, but i wanted to highlight a few i find appealing because it adds good functions that customers wants.


The good things about this portal is that you can place it on a DMZ and provide access to all your work items direct from the Internet if you want. This is a good thing for service providers for example that has the need for customers to access the tickets they have created in their system.


The portal supports single-sign-on, there is a few prereq that needs to be configured but it’s not hard to get the portal to allow AD-credentials to login automatic to provide a more seamless user-interaction.

Active Directory integration on support groups. 

The portal will have the integration we always wanted to AD. The view Teams work item will show all work that my team have. This is based on mapping all support groups to a active directory group.


As of all young products they all have limitations and this product is not different. You will still depend on the SCSM Console for a few things.


As i wrote before we have dashboards in the portal but we do not have any access to any reports.


We cannot modify any templates of any kind from the portal. If we want to change for example a service request template we have to do it from the console.

Activity management

It’s not possible to add/remove/modify activities from a service request och change. We can change for example implementer and add notes etc to the activities but if we want to remove an review activity from a service request we have to do it from the SCSM Console.

Custom Area (Service Request) 

As many of you might know it’s not possible to add a value to the Area list on service requests due to the fact it’s sealed. So we often create a new list and replace the old using authoring tool in the Console.

Now in the Cireson portal we can replace the lists on all forms but not from a system perspective. For example all other places that uses the old sealed values we cannot change. So the dashboards that comes with the console will not look at correct list. All views will not display anything from the Area and so on.


The portal does support a bunch of language but it does not work as the Console does. In the Console it will always fallback to English language if a list value does not exists in another language.

If we use Swedish as language in the portal and we have a list with only English values then the list will be empty and you have to modify the XML code to add another language so the portal can show it.


My own conclusion here is that from an analyst and a end-user perspective you can work with all your normal work items from the portal only. There is no need to use the Console to create a work item, resolve it or approve a new change etc. Everything can be achieved from the portal.

I know there is a few other 3rd party apps out there on the market also but i have not tried them yet.

If you are using SCSM and still using the portal that comes with SCSM you should check this out. I have work quite much with the portal the last months so if you have any question feel free to add a comment. Or head over to http://www.cireson.com

Service Manager 2012 PowerShell Exchange “Connector”

There is a Exchange connector for Service Manager but in my experience i think it lacks a bit of features. And it is not possible to configure it as much as i want to. To create a work around for the exchange connector i created a Powershell based “connector”

This is a kind of concept that shows you that you can create awesome stuff with Powershell and tweak you’re mail integration a lot more then with the normal connector.

The “connector” works this way, you schedule it on a management server for a interval of 5 minutes and it will use the exchange web service to look in a mailbox for emails. The script also depends on SMlets. You can download The Exchange web service here and SMlets here

By default it process all emails that has a IR prefix or SR prefix. If it finds a email that does not contain a valid prefix it is processed as trash and an email is sent to the mail sender that it contained a invalid case number.

You can change this behavior to allow all mail that does not contain a prefix or SR/IR so the “connector” will create a new incident with that content. The new incident will use a specified Incident template.

I have tested the script from a Windows 2012 R2 server with Service Manager 2012 R2 (works with UR4 also) and on a office 365 mailbox. It should work against Exchange 2010 for example if auto discovery is configured.

Functions in version 1.0

  • Incident Comments from email
  • Service Requests comments from email
  • Incident attached files added to the Incident
  • Service Request attached files added to the service request
  • Ability to create new incidents from email based on incident templates
  • If the sender of the email does not exists as a CI in service manager database an internal account will be created for that user.
  • All processed emails are kept in a folder in the mailbox
  • If the incident or service request is in the status closed the user gets an email saying the mail was not processed due to cases being closed.

Here is an example for a email that contains attached file. The subject for this email was IR122 and contained the file IR122.txt and the text “This is a test comment sent into IR122 with an attached file”


After the powershell script has run we can look in the action log and you can now see that there is an entry from me and a attached file (Bifogad fil in Swedish)


And on the related object page we can see the attached file.email_after_incident_process_relatedItems

Functions that i am working on in version 1.1

  • Be able to resolve incident by sending [resolved] in the email tag
  • Be able to complete service requests by sending [completed] in the email tag
  • Splitting the code into more functions and modules to get an more easy overview of the code


The script is available on technet gallery. Here is the link.

If you want something more added in future versions just throw in a comment below.


SQL Upgrade broke SCSM “Execution of user code in the .Net Framework is disabled”

I recently upgraded my SQL-server with a newer version (SP upgrade). I ran a SQL Server 2012 and when i upgraded some functions stopped working in SCSM. See the error below you get when going into Library -> Groups for example.


This error is easy to fix. Just login to your SQL-studio and run the following command.

Source: http://msdn.microsoft.com/en-us/library/ms131048(v=sql.110).aspx

After this is done just reboot or restart your SCSM-services and now it should work.

Check for failed workflow jobs in SCSM using powershell

You might have seen that SCSM uses many workflows for different things. You might wanna take a look on the status of the jobs. If you go to your administration tab and workflows -> status you will se a big list.


You can manually go into each workflow and click on the need attention or all instance tab. This is time consuming and you might only want to see what jobs has failed.



One way to get this done is using powershell. If we run the script below.

The output will be something like this below. You can now easy parse all the workflows and check for failed jobs.



Be aware that this script is pretty resource heavy. So don’t let it run all the time.

System Center 2012 SP1 hits Volume licensing service center

Good news for everyone that don’t have a technet subscription or a MSDN subscription. System Center 2012 SP1 are now available on the volume license portal. So start the lab and go have some fun with SC2012.