How to remove SCCM/SMS Sites from Console

Abdul Jalil Abou AlzahabEndpoint Administrator
CERTIFIED EXPERT
Published:
Problem Description:

Actually I found the below issue with some customers after migration from SMS 2003 to SCCM 2007 and epically if they change site code, some clients may appear in the console with old site code, plus old sites still appearing in Configuration Manager Console -> Site Management.

So we have two issues now:

1- After discover and deploying CCM agent, we found that some client machines show that Client status is "NO" and site code is "Old site code".
2- In sites Hierarchical, we may find old sites in Configuration Manager console - Site Management.

Note: second point may occur in case we used the same remote site database server and same database for new Configuration Manager.

Solution:

Client machines with Old site code

As we know Configuration Manager will not automatically change site code unless we manually reinstall the clients to change the site code. So to resolve this issue, we need to check the following:

a. Make sure that the old SMS/SCCM services have been removed from the old SMS server.

b. Clean the Active directory system container for existing SMS server MP and SLP information.

c. Add the site boundaries in SCCM Server.

d. Use login script to run the following script on those problematic client machines.

======

Set smsClient = CreateObject("Microsoft.SMS.Client")

smsclient.SetAssignedSite("NEWSITENAME")

======

This script will force those SMS client agent to point to new SCCM site.

e. Remove the clients records with old site code from SCCM console.

f. Re-discover those machines and monitor if the old site code being changed now.

Remove Old sites from ConfigMgr Console

The old SCCM/SMS services have been removed from old Server, However it still appear in new ConfigMgr console Site Management.

According to Microsoft Technet, if you need to start secondary site wizard, you may need to:

1- Navigate to System CenterConfiguration Manager / Site Database / Site Management / <site code> – <site name> / <secondary site code> – <secondary site name>

2- Right-click <secondary site code> and click delete.

But sometimes delete option is not available and reference to the old site still exist in Site Database.

Actually old site codes may still in Configuration Manager Site database and the following task is to delete any references related to old site Database.  

You need to open SQL Enterprise Manager console on server that host SMS/SCCM Database, and do the following:

1- Select ConfigMgr database and Backup Database.
2- Select ConfigMgr database and Run the following queries to delete any reference to the old site.

DELETE FROM SysResList WHERE SiteCode = ‘XXX’

DELETE FROM SiteBoundaryADSite WHERE SiteCode = ‘XXX’

DELETE FROM SiteBoundaryIPSubnet WHERE SiteCode = ‘XXX’

DELETE FROM SiteControl WHERE SiteCode = ‘XXX’

DELETE FROM SiteControlNotification WHERE SiteCode = ‘XXX’

DELETE FROM Sites WHERE SiteCode = ‘XXX’

DELETE FROM Sites_DATA WHERE SiteCode = ‘XXX’

DELETE FROM SiteWork WHERE SiteCode = ‘XXX’

DELETE FROM PkgServers WHERE sitecode = ‘XXX’

DELETE FROM PkgStatus WHERE sitecode = ‘XXX’

Note: Change XXX to secondary site code

Best Regards
3
9,861 Views
Abdul Jalil Abou AlzahabEndpoint Administrator
CERTIFIED EXPERT

Comments (2)

Abdul Jalil Abou AlzahabEndpoint Administrator
CERTIFIED EXPERT

Author

Commented:
Now I got your point, actually schedule for site backup is required, but it's high recommended to backup database before doing any change, I'm agree with you, I'll add it now.
John HammondPresident

Commented:
Any idea what the "replacements" are for SiteBoundaryADSite and SiteBoundaryADSite in 2012?

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.