Trackback to the previous version of SM. Let’s auto close resolved incidents after 2 days using a custom MP in service manager 2010 SP1. Been there , done that but it is a requested feature by a lot of clients so here we go …
You will need the the service manager authoring tool and the Smlets powershell scripts. You can find them here http://smlets.codeplex.com/.
First create an MP with a powershell script.
Run at scheduled time
Choose desired schedule
Add Powershell script to the workflow
Set the script body. Here we used a 5 minute interval for testing. ( d.hh:mm:ss )
get-scsmincident -status resolved -inactivefor 2.00:00:00 | set-scsmincident -status closed -comment “Auto Closed”
Add snapin Smlets as snapin
Copy the created .dll to the system center 2012 installation directory
Create public / private key pair as described in http://msdn.microsoft.com/library/6f05ezxy.aspx
Seal the MP
Import the MP and test …
At first however the worklfow failed.
Solution is to modify the script to import-module smlets and remove it from the GUI