Creating new work items with SMLets
When automating your ITIL processes, there will be situations where you will need to create new work items programmatically. For instance, you might have a scheduled change once a month or you would like to automatically create incidents when you discover an error in the event log of some LOB application.
In this recipe, we will take a look at how we can create a new service request with included activities directly from PowerShell.
The end result would look like this:
Getting ready
Make sure that you've followed the Downloading and installing SMLets recipe earlier in this chapter. It's also very good if you have tried the other recipes that have something to do with PowerShell and/or SMLets, as the syntax for what we are going to do here can be quite complex otherwise.
How to do it...
Using SMLets we will create a new service request that includes two manual activities. This service request is a part of the backup-teams routine to perform restore...