Skip to content
How to Edit SCCM Site Control sitectrl File ConfigMgr

How to Edit SCCM Site Control sitectrl File ConfigMgr

Written By Anoop C Nair
Last Updated July 28, 2024
Posted In SCCM
SHARE

How to Edit SCCM Site Control sitectrl File ConfigMgr Endpoint Manager.

Disclaimer – Editing/Updating DataBase or Site Control (sitectrl) file is NOT supported.

We all know that ConfigMgr 2012 doesn’t store the Site Control ( sitectrl ) file in the file system. However, it’s stored in the SQL database (as an XML file).

The site control file in Configuration Manager is an ASCII text file called Sitectrl.ct0. It contains all the configuration details for each site.

Patch My PC
Index
1. How to View the Site Control ( sitectrl ) File?
2. How to Edit or Update the Site Control ( sitectrl ) File?
3. How to Change the Site Description ( SiteName )?
4. Verification – ConfigMgr 2012 Console and WMI Class “SMS_SCI_SiteDefinition”
How to Edit SCCM Site Control sitectrl File ConfigMgr – Table 1

How to Edit SCCM Site Control sitectrl File ConfigMgr Endpoint Manager

The following are the 4 topics that I would like to cover in this post. This post only applies to SCCM / ConfigMgr 2012 and the current branch.

1. How to View the Site Control ( sitectrl ) File?

You can run the following query to VIEW the Site Control ( sitectrl ) file from the Data Base.

Note – Replace “SITECODE” with YOUR 3-digit site code.

SELECT SiteControl FROM vSMS_SC_SiteControlXML WHERE SiteCode = ‘SITECODE’

How to Edit SCCM Site Control sitectrl File ConfigMgr - Fig.1
How to Edit SCCM Site Control sitectrl File ConfigMgr – Fig.1

Click on the link in the query windows’ result pane. That will open up the Site Control ( sitectrl ) XML file.

How to Edit SCCM Site Control sitectrl File ConfigMgr - Fig.2
How to Edit SCCM Site Control sitectrl File ConfigMgr – Fig.2

2. How to Edit or Update the Site Control ( sitectrl ) File?

As most of us know, we can’t directly edit this XML file from the Database (just like we used to do with Notepad in SCCM 2007).

I failed to update the XML file even with the following SQL command. Later, I learned that this method would ONLY work if the object was a table or updatable view. In my case (I think), this is neither a table nor an updateable view.

Incorrect Method

  • DECLARE @newValue varchar(50)
  • SELECT @newValue = ‘SCCM 2012’
  • UPDATE vSMS_SC_SiteControlXML SET SiteControl.modify
    (‘replace value of (/SITE_CONTROL_FILE Version=”5.00.7678.0000″/SITE_DEFINITION/SiteName/text())[1] with sql:variable(“@newValue”)’)

Error

  • Msg 4406, Level 16, State 1, Line 1
  • Update or insert of view or function ‘vSMS_SC_SiteControlXML’ failed because it contains a derived or constant field.

So, to edit the sitectrl file, I need to find out the views and tables that are related to the View vSMS_SC_SiteControlXML.

After some research, I noticed the following tables and views related to the ‘vSMS_SC_SiteControlXML’  view.

The tables are related to the site control ( sitectrl ) XML file.

dbo.SC_SiteDefinition, dbo.SC_SiteDefinition_Property and dbo.SC_SiteDefinition_PropertyList

How to Edit SCCM Site Control sitectrl File ConfigMgr - Fig.3
How to Edit SCCM Site Control sitectrl File ConfigMgr – Fig.3

3. How to Change the Site Description ( SiteName )?

I wanted to change the site description (the “SiteName” value from the XML file) in this scenario. The current description is “Configuration Manager 2012 Primary Site,” and it should be updated to “SCCM 2012.”

At last, I found that I needed to update the “SiteName” value from the table called “SC_SiteDefinition” to update the site description.

Once you’ve updated the value (using the following SQL query), the site description will automatically be updated in the site control (sitectrl) XML file.

You can verify this by opening the sitectrl file and using the query mentioned at the start of this post.

Run the following query (in “SQL studio –> New Query”) to update the Site description to “SCCM 2012”.

Note: Change the SiteName (site description)

Update SC_SiteDefinition set SiteName = ‘SCCM 2012’ where SiteCode = ‘MCM’

How to Edit SCCM Site Control sitectrl File ConfigMgr - Fig.4
How to Edit SCCM Site Control sitectrl File ConfigMgr – Fig.4
How to Edit SCCM Site Control sitectrl File ConfigMgr - Fig.5
How to Edit SCCM Site Control sitectrl File ConfigMgr – Fig.5

4. Verification – ConfigMgr 2012 Console and WMI Class “SMS_SCI_SiteDefinition”

The change is also reflected in the ConfigMgr 2012 console and in WMI (more details – SMS_SCI_SiteDefinition ). See,

How to Edit SCCM Site Control sitectrl File ConfigMgr - Fig.6
How to Edit SCCM Site Control sitectrl File ConfigMgr – Fig.6

WMI Query – select * from SMS_SCI_SiteDefinition

How to Edit SCCM Site Control sitectrl File ConfigMgr - Fig.7
How to Edit SCCM Site Control sitectrl File ConfigMgr – Fig.7

I’m not sure of any other EASY way or method to update the site control (sitectrl) file. Please share if you find one.

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

Anoop C Nair has been Microsoft MVP from 2015 onwards for 10 consecutive years! He is a Workplace Solution Architect with more than 22+ years of experience in Workplace technologies. He is also a Blogger, Speaker, and leader of the Local User Group Community. His main focus is on Device Management technologies like SCCM and Intune. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security, Career, etc..

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion · 9 comments

  1. Hi Anoop – You dont want to mess the things in DB directly especially for Site Control file. It would cause very interesting problems and may lead to restore of DB from backup to say the least.

    Having said that you may want to WMI classes which were available for Site Control File manipulation I dont remember exactly name and location etc but you are smart enough to find them out on your own. 🙂

    -JitenRK

    1. Hi Jiten – I know (that is what I mentioned in the bottom of the post). It’s better to use a script. Please share/publish the power shell script to achieve this (if you’ve any)!!

  2. Hi Anoop,

    How do I delete specific LDAP path from sitecontrol file from ‘Active Directory Security Group Component’ ..?

    some background info:
    On one of my SCCM 2012 R2 primary site, Component ‘SMS_AD_SECURITY_GROUP_DISCOVERY_AGENT’ is critical. When i check for error messages, I can see below error,

    Active Directory Security Group Discovery Agent failed to bind to container LDAP://CN=Users,DC=Domain,DC=COM. Error: E_ADS_PROPERTY_NOT_FOUND.

    Possible cause: The AD container specified earlier might be invalid now. The Domain Controller is inaccessible.

    Solution: Please verify that the AD container paths specified are valid. Confirm accessibility of the site server to the Domain Controller to be queried.

    Above LDAP path is no more in ‘Security Group’ discovery nor exists in AD. so how do i remove it from database?

    Thanks

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read