Change Site Code of Configuration Manager Client

12057

Change Site Code of Configuration Manager Client In this short post we will see how to change site code of Configuration Manager client. Every site has a site server, a site database, and a three-character alphanumeric site code. The site code must be unique in the hierarchy. Site codes are used to identify the sites in a Configuration Manager and site code must uniquely identify each Configuration Manager site in the hierarchy. Having said that there might be reasons why you want to change the site code of the configuration manager client. Let’s assume you have ConfigMgr 2007 installed in your company and now you want to migrate the objects to Configuration manager 2012. ConfigMgr 2007 and System Center 2012 Configuration Manager publish information into the same Active Directory system folder when implemented in the same domain. As a part of the migration process, you should plan for new site codes for your System Center 2012 Configuration Manager hierarchy.

When you are choosing the site code while installing SCCM you should keep few things in mind.

1) Avoid using reserved names such as AUX, CON, NUL, PRN when choosing site codes. Click this link to see list of reserved file names.

2) Avoid reusing site codes previously used in your ConfigMgr hierarchy. Configuration Manager Setup does not verify that the site code entered is not already in use. Site codes are stored in the site databases. If you were to reuse a site code, you may discover that all references to the old site were not fully removed or are re-introduced from a restored backup. This could cause problems resolving the site.

 

Change Site Code of Configuration Manager Client

Now we will see how to change site code of SCCM client using a script. In the below script replace your site code in place of P01 and save it as filename.vbs.

[TS_VCSC_Icon_Flat_Button button_style=”ts-color-button-carrot-flat” button_text=”Download script to change the site code” icon=”ts-awesome-cloud-download” el_file=”” link=”url:https%3A%2F%2Fwww.dropbox.com%2Fs%2Fq9bqerbinwojde3%2FChange_sitecode.zip%3Fdl%3D0|title:Download%20Script|target:%20_blank”]

If you want to change the site code on a single computer then copy the script to the computer and run the script. If you are looking to change the site code for set of computers then let’s see how to do that. Launch the configuration manager console, navigate to Software Library and click on Packages. Right Packages and click Create Package.

Change Site Code of Configuration Manager Client

Specify the Name and Source folder of the package. Click Next.

Change Site Code of Configuration Manager Client

Create a standard program and specify the details such Name, command line etc. Click Next.

Change Site Code of Configuration Manager Client

Complete the rest of the steps and click Close.

Change Site Code of Configuration Manager Client

After you create this package you need to distribute the package to the DP. Once the package is available with the distribution point, right the package and click Deploy.  Choose the collection to which the package is to be deployed. Click Next.

Change Site Code of Configuration Manager Client

Choose the purpose as Required or Available. Click Next.

Change Site Code of Configuration Manager Client

To schedule the deployment click on New and click As soon as possible. Click Next.

Change Site Code of Configuration Manager Client

Complete the remaining steps and click Close.

Change Site Code of Configuration Manager Client

After few minutes login to the client computer and check the configuration manager properties. Click General tab and under client properties we see that the site code is changed to P01 (as per the script).

Change Site Code of Configuration Manager Client

 

For troubleshooting purpose you can view the execmgr.log file.

Change Site Code of Configuration Manager Client