Script to create SCCM Site boundaries automatically

Some time ago I posted some scripts on how to create site boundaries via script in SMS (https://alipka.wordpress.com/2007/05/21/automating-sms-2003-secondary-site-installations/). For SCCM apparently the SDK slightly changed. The SMS version of the script does not work. This is the thing that changed:

There is no more “SMS_SCI_SiteAssignment” property, instead you should use “SMS_SCI_RoamingBoundary”.

I posted the script that works with SCCM here: SiteBoundaries.zip

NOTE: this script had very limited testing, please use at your own risk only with prior testing!

Advertisements

~ by alipka on January 5, 2009.

13 Responses to “Script to create SCCM Site boundaries automatically”

  1. […] https://alipka.wordpress.com/2009/01/05/script-to-create-sccm-site-boundaries-automatically/ […]

  2. This script works well for IP address ranges as well. The syntax for the SiteBoundaries.txt file is:

    -,IP Ranges,,0,

  3. This script works well for IP address ranges as well. The syntax for the SiteBoundaries.txt file is:

    [STARTING IP]-[ENDING IP],IP Ranges,[DESCRIPTION],0,[SITE CODE]

  4. There are a couple of trifling bugs in the script. First – line 157 always prints debug info for the third boundary, not the new one. Replace each “2” in that line with “UBound(arrayname)” for each one:

    wscript.echo aDomainArray(UBound(aDomainArray)), bDomainArray(UBound(bDomainArray)), cDomainArray(UBound(cDomainArray)), dDomainArray(UBound(dDomainArray))

    Also – don’t run the script with the same input multiple times – it will create duplicate boundaries (and the SCCM console doesn’t like that at all).

    To add an AD Site as a boundary, use the following format in your data file:

    [ADSite],AD Site Name,[Description],[Speed],[SiteCode]

    For example:
    KN-Topeka,AD Site Name,US/Kansas/Topeka,1,ORG

    Note that 0 is fast and 1 is slow.

  5. script works perfectly…..

    Do you also know a script to remove all boundaries from SCCM ?
    I want to remove the boundaries first and then use a input file and your script to upload all boundaries from scratch….

    • I’m afraid I have not touched SCCM for the last 1,5 years so I do not really know. sorry not to be of much help.

  6. Hi there,

    I am trying to add an ip range like this:
    192.168.1.0-192.168.1.100, IP Ranges, VPN Users, -1, S02
    But nothing is added, am i doing something wrong?
    Thank you very much.

    Mor

  7. 192.168.1.0-192.168.1.100, IP Ranges, VPN Users, -1, S02
    -1 is not an option, you have 0 or 1 for fast and slow.

    try this
    192.168.1.0-192.168.1.100, IP Ranges, VPN Users, 0, S02

  8. Hi,
    Will it work SCCM 2012?

  9. […] I searched the internet and found a nice script on this […]

  10. Is SMS_SCI_RoamingBoundary still in SCCM 2012? I don’t think it is, as the script errors out (SWbemServicesEx: Invalid class) when trying to set this object:

    Set oSCI_SiteAssign = goWMIConnection.Get(sRelPath,, goWMIContext)

  11. The script works great for ad sites, but I can’t get it to work for IP Subnets. Example of what I’m using: 10.10.10.1,IP subnet,TEN,0,CEN

    Am I missing something?

    • Got it! I went into the site DB looked up the “BoundaryType” code, found out that IP subnet = 0, did a find and replace on my spreadsheet, and kicked it off. Worked like a champ.
      Example: 10.10.10.1,0,TEN,0,CEN

      This script saved me days of work. Thank you!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: