Have you ever found yourself in a situation where an SMS Advanced client ends up getting policy or advertisements from the wrong site, or they are using the wrong MP/DP? This is a very common issue for our customers and determining root cause can be difficult. When AD Sites and IP Ranges were included in SMS 2003 overlapping boundary issues became much more common and much harder to control. In many larger environments the administrator managing SMS is not responsible for managing AD sites causing even more confusion.
Back in early 2005 I wrote an executable called SMSBoundaries.exe that is used to troubleshoot such issues. SMSBoundaries.exe would query AD and convert all subnets specified in any SMS AD Site boundary to IP ranges. It would then convert those ranges to integer format and look for overlaps between all boundaries. This tool is still widely used by Microsoft support but it has several flaws. One of the flaws is that it won't find overlapping situations due to orphaned data left in AD, or data from a separate hierarchy. Another flaw is that it couldn't really find all the possible overlaps if SMS Subnets were specified because it didn't know the subnet mask of the clients (hence it couldn't really derive the appropriate IP Range to use for comparison).
Despite these flaws I intended to make sure this tool was included in the next release of the toolkit (then toolkit3). Obviously this toolkit never came out therefore the tool remained for use by only Microsoft support to help solve issues related to overlapping boundaries.
Over the years I've been asked to convert this tool to vbscript. The reason for doing this is because it's easier to include in other tools support uses to troubleshoot SMS (like the new version of MPSReports that support uses to collect technical data to diagnose customer issues) and it's easier to get in more people's hands.
Back in October 2006 I converted the tool to vbscript and added the missing functionality to the new tool. I have since added a few more things with the help of Jeff Tondt from Microsoft Consulting Services. This script is intended to be an example demonstrating how to find overlapping SMS boundaries in your environment. Like the rest of the examples on this blog this script is not supported. Here is a description of this script:
Syntax:
Cscript.exe smsboundaries.vbs verbose <clientname>
The verbose and <clientname> parameters are both optional.
The output of the script is an XML and Log file created in the same directory where the tool is run. The tool should be run on the SMS Central Site using an account that has rights to the SMS Central site, AD, and the client if one is specified on the command line. The XML file should be used for general viewing and the log file should be used when troubleshooting an issue with the script, viewing which boundaries are overlapping in the case where you have many overlapping boundaries, or when looking to see what sites a client specified on the command line falls under.
How it works:
Things to consider:
*This is an example of how to find overlapping boundaries in your environment. If you find any issues with this example or can think of additional functionality which should be added please comment on this blog entry. If any updates to this example are needed I will upload the script changes to this blog entry and update the version number in the title.*