Wednesday 1 July 2015

Removing default Support Group Tiers (and other bits) from SCSM 2012 R2 with PowerShell

When you install Microsoft System Center 2012 R2 Service Manager and open the console, one of the first things you see are some default views for Incident Management for Support Groups based on the default supplied Tier 1, Tier 2, Tier 3 list items.





This is to give newcomers at least a bit of a view of how you can start to organise the system, however these are supplied as part of the default ServiceManager.IncidentManagement.Configuration management pack are can't just be deleted from the console as the list enums are linked to some of the default Templates as well as the views.
 
It's already a fairly well documented process and can be found here for example:
http://scsm.us/2013/nuking-the-default-scsm-incident-support-group-folder
 
http://blogs.technet.com/b/servicemanager/archive/2012/05/09/removing-the-sample-incident-management-configuration-support-tiers-1-2-3.aspx
 

However... I've never been a fan of doing things manually and after forgetting to remove them the other day and having an issue after importing a custom management pack, I thought I'd try to make the process easier.
 
So I've uploaded a PowerShell script to the TechNet Gallery that automates the process.


https://gallery.technet.microsoft.com/Remove-Default-SCSM-Tier-ee23edb2
 


This script can be used with or without any parameters and should be run from an SCSM Management Server (it may work from a workstation with the console installed, I just haven't had chance to try) and will do the following:


  • Export the ServiceManager.IncidentManagement.Configuration management pack
  • Read in the XML
  • Increase the version count of the MP by 1
  • Remove Support Group Tier Enums
  • Remove the Category references
  • Remove the Tier 1 Support Group assignment from the default Incident templates
  • Remove the Incident Support Group (Assigned and Unassigned) views
  • Remove the Support Group folder
  • Removethe Folder Items
  • Remove Image References
  • Remove String Resources
  • Remove Display Strings
  • Save the XML back to the file
  • Reimport the management pack
Bear in mind that updates and future versions of Service Manager may replace this management pack and add the removed items back. If they do (and things haven't changed too much) you should only need to re-run this script to remove them again.

As always, the usual disclaimer...
Please test this script first in a non production test environment. While it works for me, I cannot take responsibility if it damages your environment.

No comments: