SCCM CB How to Recover and Recreate Boundaries and Boundary Groups

This post will help to recover and restore the list of SCCM/ConfigMgr CB boundaries and Boundary groups along with site assignments, site server details.


What will happen when someone accidentally deletes all your SCCM CB boundaries and boundary groups? Your SCCM CB infrastructure is useless without boundaries and boundary groups. Once SCCM boundaries are removed then, the Application deployment, OS deployment, patching will get impacted. How to we recover from this kind of situation? SCCM community is very strong and loads of helpful tools to help us to get out from all the stressful situations. SCCM Boundary Groups Recovery options !

Don’t make any mistake, SCCM/ConfigMgr CB backup is always important in any situation. Apart from SCCM backup, it’s always better to have a full documentation of your entire SCCM/ConfigMgr hierarchy. David O’Brien has created an excellent script to create the documentation of your SCCM infrastructure automatically. Now, this script is maintained by Carl Webster and this is the teamwork of the community. You can get the latest copy of SCCM CB documentation PowerShell script from here.

SCCM CB How to Recover and Recreate Boundaries and Boundary Groups 1What are the options to recover the SCCM CB boundary and SCCM CB Boundary group details?

There are four options to recover SCCM IP details of each boundary along with boundary groups details. Any one of these steps will help you to recover the list of SCCM boundary IPs and groups. I would recommend the first two options as the best ones, but unfortunately, if you don’t have that kind of documentation then, go ahead and check the option 3. Option 4 is very drastic; I would always avoid it for sure!

  1. Create the documentation of your SCCM/ConfigMgr infrastructure and retrieve the IP details of boundaries from the documentation. Boundary groups information can also retrieve from this documentation.
  2. Maintain the list of all the IP address boundaries and boundary groups with site system details. Whenever you perform any changes related to boundaries or boundary groups, update the spreadsheet which you maintain.
  3. Look for the latest SCCM CB SQL database backup, attach the copy of the SCCM site DB backup CM_PR1 (where PR1 is the site code) to another SQL Server. Query the boundary related tables or views to get details of IP Details boundaries and boundary groups.
  4. This is a drastic step/option, and I will never recommend this option. The option is to restore SCCM CB CAS/Primary SA from the last SQL backup or SCCM Full backup. But the advantage of this option is that you don’t have to recreate the boundaries and boundary groups.SCCM Boundary Groups Recovery
  5. Djam’s option share via twiiter – Option 5 – use the data warehouse feature in #SCCM 1702; and use PS script to recreate the boundaries from history in the warehouse.

What are the options to recreate the SCCM CB recovered boundaries and boundary groups?

When somebody by mistakenly deleted all the IP range boundaries (more than 1000) and more than 700 boundary groups, the recovery is the pretty easy task if you compare the task of recreating those. Following are the high-level tasks which we need perform to get your SCCM infra back on track.

SCCM Boundary Groups Recovery

– Create boundaries from retrieved IP Ranges (Using PowerShell Script)
– Create boundary groups with boundaries (Using PowerShell Script)
– Perform the site assignments for each boundary groups (Using PowerShell Script)
– Add DPs to specific boundary groups (Using PowerShell Script)
– Add MPs to specific boundary groups (Using PowerShell Script)

Manually creating boundaries and boundary groups are impossible. The better way is to research and find out some PowerShell script to perform all these tasks automatically with lesser manual efforts.

We found the PS script for creating boundaries without much efforts from here. Big thanks to “Marius A. Skovli” !! But we struggled a bit to find a script for creating boundary groups along with rest of the tasks I mentioned in the above list.

James Bannan has a PowerShell script to create boundary groups from the boundaries here. Big thanks to James B!! We modified Jame’s script (check out the copy of the edited script below) to match our requirement (loop) and to take the input from the CSV file.

Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" # Import the ConfigurationManager.psd1 module 
Set-Location "II0:" # Set the current location to be the site code.
$CMSiteCode = 'II0'
# 1.0 Get Existing Boundary
$Boundaries = Import-Csv -Path "C:\Users\Abhay\Desktop\te\BoundaryGroup.csv"
foreach($Boundary in $Boundaries)

            write-host $Boundary.BoundaryName
            $BoundaryName = Get-CMBoundary -BoundaryName $Boundary.BoundaryName
# 1.1 Create Boundary Group
             New-CMBoundaryGroup -Name $Boundary.BoundaryGroupName `
              -Description $Boundary.BoundaryGroupName `
              -DefaultSiteCode $CMSiteCode `
# 1.2 Get Newly-created Boundary Group
            $NewBoundaryGroup = Get-CMBoundaryGroup -Name $Boundary.BoundaryGroupName
# 1.3 Add Boundary to Boundary Group
            Add-CMBoundaryToGroup -BoundaryName $BoundaryName.DisplayName -BoundaryGroupName $NewBoundaryGroup.Name

We need to perform site assignment for each boundary groups along with DP/MP servers assignment. We tried to automate the process of adding site system server details to boundary group, but that was a bit complex because of the problem with the PowerShell.

The addsitesystemserver parameter specifies the site system server and link speed as the key/value pair in a hash table. The Hashtable value for AddSiteSystemServer parameter was creating issues when we tried to automate it, but we automate it. We successfully automated it with the help of concatenation function of Microsoft EXCEL.

Important: Starting in version SCCM CB 1610, FastLink is the only supported value for the hash table for the AddSiteSystemServer parameter.

Set-CMBoundaryGroup -Name "Bangalore Boundary" -AddSiteSystemServer @{"" = "FastLink"}
Set-CMBoundaryGroup -Name "Mumbai Boundary" -AddSiteSystemServer @{"" = "FastLink"}
Set-CMBoundaryGroup -Name "Pune Boundary" -AddSiteSystemServer @{"" = "FastLink"}
Set-CMBoundaryGroup -Name "Hyb Boundary" -AddSiteSystemServer @{"" = "FastLink"}


  • Documentation about PS commandlet Set-CMBoundaryGroup – here and here
  • SCCM CB 1610 Boundary Group Strategy – Here


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.