Kevin Holman's System Center Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of UseAre you interested in having a dedicated engineer that will be your Mic

What’s the diff? Or – how to see exactly what is new with an updated MP

What’s the diff? Or – how to see exactly what is new with an updated MP

  • Comments 2
  • Likes

Back in MOM 2005…. we had some really cool reskit tools to look at differences in Management Packs.  In the MOM 2005 reskit, there was a tool called MP2XML.exe which would take an AKM MP, and convert it to XML.  Then, you could run another reskit tool, MPDiff.exe, which could graphically show you all the rules, scripts, providers, groups, attributes, etc… that had changed between the two MP versions.  This was great – because we could really get a solid idea of what has changed in a MP update, down to the nuts and bolts.  This is necessary – as a first step in understanding what's new, and making sure it wont break anything that we depend on.

 

In OpsMgr 2007, we really don't have a good tool here.  There are several reasons… but mostly the XML options in SCOM are WAY more in number than what was available in MOM 2005.  Writing this new diff tool would be nice… but is also pretty complicated.  I am going to walk through an example of how you can accomplish this today, using some free and 3rd part tools.

 

First – we need to get our sealed and encrypted MP files into raw XML.  The best way to do this, without having to depend on importing and exporting from a live management group, is to use Boris’s script: 

http://blogs.msdn.com/boris_yanushpolsky/archive/2007/08/16/unsealing-a-management-pack.aspx

 

For this example – I am going to use the recently updated SQL 2005 discovery MP.  This was updated from 6.0.6441.0 to 6.0.6460.0, in order to fix how we discover large SQL databases.

First – we will convert BOTH MP files to XML, using Boris’s script.  I copied the script to my C:\BIN\ directory, and copied each MP file to C:\BIN\OLD and C:\BIN\NEW.

powershell C:\bin\MpToXml.ps1 -mpFilePath:'c:\bin\old\Microsoft.SQLServer.2005.Discovery.mp' -outputDirectory:'c:\bin\old\'

powershell C:\bin\MpToXml.ps1 -mpFilePath:'c:\bin\new\Microsoft.SQLServer.2005.Discovery.mp' -outputDirectory:'c:\bin\new\'

 

Now – once I have the raw XML, I can diff the files.  There are lots of XML diff tools out there.  XML Notepad is free from Microsoft, and I will also give an example from Beyond Compare 2, which I happen to use.

 

 

Using XML Notepad – open the old XML file.  Then – View – Compare XML files:

 

 

image

 

 

Choose the new file.  This will launch XmlDiff – and will have hyperlinks to click to jump to each detected change in the MP:

 

 

image

 

Using this tool – we can quickly see that the DiscoverSQL2005DB.vbs was the primary change here:

 

image

 

 

 

Using a tool like “Beyond Compare” will give a few more powerful features, like the ability to show all the code, or JUST the differences.  This shows the actual code changes in the script… instead of just marking the script as what was changed:

 

 

image

 

image

 

 

There are likely other good XML diff tools out there.  Obviously it would be nice to have one that could provide a summary in the context of OpsMgr… like Attributes, Discoveries, Class definitions, Scripts, Groups, etc…. and put that in a UI in plain English…. but until then, this should give us the information we need to digest what is new.

 

If any of you have some better/cooler XML diff tools, or approaches to this challenge – love to hear it!

Comments
  • Source: Kevin Holman’s OpsMgr Blog Kevin blogged about ways to find the differences between different

  • Dell has updated their hardware management pack.  The old version was 3.1.0.118.  The new version

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Search Blogs