SCSM Management Pack Reference/Dependency Checker
Find out your MP dependencies, download them and import them all automatically!
Introduction
One of the biggest issues that we face when it comes to importing Management packs into SCSM (System Center Service Manager), is the long amount of dependencies in which we need in order for them to import successfully.
This normally requires us to manually look for these management packs which can normally be a very long administrative task, as well as a huge trial an error to see if not only you have the correct management packs but also to check if you have the correct version.
The SCSM Reference Checker script will perform the following
· Convert your MP to XML
· Read the references and output the result
· Download the required MPs
· Import them into SCSM
All of your dependency MPs will be downloaded into a separate created folder which you will be given the path to which will outline to which MP its dependencies belong to.
Note that the last two are really optional if you wish to have the script take over this entire process in an automated fashion, otherwise it will tell you exactly which management packs you require.
Current Issue Outlined
Below here is the issue you normally see in SCSM when it comes to checking to see if you can import your Management pack into SCSM
https://irp-cdn.multiscreensite.com/c1f89e50/dms3rep/multi/desktop/Dependency-600x563.png
Figure 1.1 – Showing the error which you get from trying to import the Management Pack into SCSM
You can see in the Management Packs where it references the management pack and version in which you are missing, and further down will show more dependencies.
This can cause further effort to find and then to find out the MP which you are looking to retrieve also has a great list of dependencies.
Resolution From the Script
Convert your .MP to .XML
In order to actually read the details of the management pack you are looking to import, we need to convert this into an .XML first.
The first function in the script being Convert-MPtoXML will perform the following result for you below
https://irp-cdn.multiscreensite.com/c1f89e50/dms3rep/multi/desktop/ExportedFile-592x21.png
Figure 1.2 – Successful exported conversion of your .MP to .XML
Read the Reference Dependencies
In all management packs the references are listed at the beginning, so the next function which is Read-MPReferences will parse the XML and then create an output file which you can also view manually if not wanting to have the script go further to automatically download these on your behalf
https://irp-cdn.multiscreensite.com/c1f89e50/dms3rep/multi/desktop/DependencyOutput-1242x154.png
Figure 1.3 – This object shows the names of the Management Packs, the version of them and also the link to the https://systemcenter.wiki which contains the download location for them
Download the Management Packs
The next part if wanting to go ahead with the full automated process, this will be the function called Download-MP which will perform the following
· Browse each systemcenter.wiki link
· Search for the download link
· Download the Management packs to the output folder of your choice
Each management pack has the naming convention of <ManagementPackName>.<Version>.mp
https://irp-cdn.multiscreensite.com/c1f89e50/dms3rep/multi/desktop/DownloadProgress-356x80.png
https://irp-cdn.multiscreensite.com/c1f89e50/dms3rep/multi/desktop/DownloadedFiles-729x82.png
Figure 1.4 – Result of the downloaded files and how long it took to download them
Import Management Packs
The final part of the script is to perform an import of the management packs
Which will collate the MPs from the location you chose to be the output and will then proceed to import them into SCSM after importing the CMDLets required.
Where To Download
This can be downloaded on the TechNet Gallery here
https://gallery.technet.microsoft.com/SCSM-Management-Pack-2283b497