Uninstall SCCM Primary Site | Remove ConfigMgr Primary Site

In this article, we’ll look at how to remove ConfigMgr primary site or uninstall SCCM primary site from the setup. You can use this guide to quickly delete a primary site.

The steps to remove or uninstall a primary site are simple. However, if you plan to remove a primary site, you must first go through the prerequisites, which are important.

If you have a CAS in your setup, you can also remove the central administration site from the hierarchy, but keep the primary site. You can run Configuration Manager setup to uninstall the CAS that doesn’t have child primary sites.

Reasons for removing a Primary Site in Configuration Manager

Let’s figure out why you want to uninstall or remove a primary site in SCCM. For the following reasons, you might want to uninstall a primary site from your hierarchy:

  • Consolidate sites to reduce costs and complexity
  • Reconfigure or redesign the sites of the hierarchy

You uninstall a Configuration Manager primary site that has got many issues, and you may want to get rid of it and set up a new site again.

If you are running Configuration Manager in your lab, you may want to remove the existing primary site and build a new one. In such situations, one can consider removing a primary site.

SCCM Site Reset vs SCCM Site Uninstall

There is a difference between site reset and site uninstall in SCCM. Site Reset helps you to re-apply the default files and registry permissions on the site server. It also re-installs each Configuration Manager component. Whereas, a site uninstall will completely remove all the SCCM components from your server.

Refer to the following guide on how to perform SCCM site reset. In this article, we will cover the steps to uninstall SCCM primary site from your setup.

ConfigMgr Site Removal Order

Since you have chosen to remove the SCCM primary site, there are a few things I would like to add here. What if you have a hierarchy with multiple sites? Can you decommission the primary site server directly? The answer is “No.” There is an order that you need to follow for site removal.

When you plan to remove sites in Configuration Manager, the sequence of removal is important. Remember that if your hierarchy has multiple sites, you must start by uninstalling the sites at the bottom of the hierarchy and then move upward.

  1. First, remove secondary sites attached to primary sites.
  2. Next, remove the primary sites. We will see how to do that in this post.
  3. After all the primary sites are removed, you can uninstall the central administration site.

As mentioned earlier, I have got just one primary site in my lab setup. Regardless of the roles that are installed on the site server, we will simply uninstall the configuration manager primary site by following a few easy steps.

Prerequisites to uninstall a primary site in SCCM

The administrative user who runs Configuration Manager setup needs the following security rights:

  • Sysadmin rights on the site database
  • Local Administrator rights on the primary site server
  • If the primary site database server is remote from the primary site server, local Administrator rights on the remote site database server for the primary site.
  • Infrastructure Administrator or Full Administrator security role on the Primary site

Note: When a secondary site is attached to the primary site, you must remove the secondary site before you can uninstall the primary site. Refer the following guide to uninstall SCCM Secondary Site.

How to Uninstall SCCM Primary Site

You run Configuration Manager setup to uninstall a primary site that doesn’t have an associated secondary site. Use the following procedure to uninstall a primary site.

Login to the site server and go to Programs and Features. Right-click System Center Configuration Manager Primary Site Setup and click Uninstall/Change.

How to Uninstall SCCM Primary Site
How to Uninstall SCCM Primary Site

You will now see system center configuration manager setup wizard. Click Next.

How to Uninstall SCCM Primary Site
How to Uninstall SCCM Primary Site

On the Getting Started page, select Uninstall a Configuration Manager site.

Uninstall this Configuration Manager site
Uninstall this Configuration Manager site

Before you uninstall SCCM primary site, there are two options that you see here.

  • Do not remove the primary site database.
  • Do not remove the Configuration Manager console.

Both these options are self-explanatory. I would not check any of these options, as I want to uninstall the ConfigMgr primary site completely.

You will now see a message box “Are you sure you want to uninstall the SCCM Site?“, on the confirmation box, click Yes.

Remove ConfigMgr Primary Site
Remove ConfigMgr Primary Site

The primary site uninstallation begins now. There are many steps involved in uninstalling the SCCM primary site, so leave the server idle during the primary site uninstallation. You can click View Log and that will open the ConfigMgrSetup.log file. In my lab set up, the primary site got uninstalled in 14 minutes.

How to Uninstall SCCM Primary Site
Configuration Manager Primary Site Uninstalled

The ConfigMgrSetup.log file records the primary site uninstall process. At the end of the log file, you should see Completed Configuration Manager Server Setup – Uninstallation. This confirms the primary site has been uninstalled successfully.

How to Uninstall SCCM Primary Site

Peeking into the System Management container, there are no entries related to the primary site server. This means your primary site has been uninstalled cleanly.

How to Uninstall SCCM Primary Site

Leave a Reply

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

9 Comments

  1. Hi Prajwal, what about a full uninstallation of SCCM, one client wants to remove entirely from their system, is the same steps?

  2. If I’m going to uninstall my only primary site and perform a clean reinstall, so I need to uninstall the agents that have been deployed within my environment first (or at all)?

  3. Hi I am getting error to uninstall CAS after failed installation attempt. The uninstallation process is failing with “Cannot continue uninstall, Setup failed to get the number of attached primary sites”. Their is no primary site this is first cas server. Please help. Thanks

  4. I just found “Windows Deployment Services” as an installed Server role. I assume SCCM installed it automatically when I chose that option. I have removed and restarted. Now I just have the 2 services SMS Agent host and SMS_Notification_server. I copied ccmsetup.exe from installation DVD and tried running ccmsetup.exe /uninstall but both of those services are still there. Is there another way to cleanly remove it?

  5. I found the following services still on the server and running:
    Windows deployment services server
    SMS Agent Host
    SMS_Notification_server – not running

    I disabled the two and restarted the server and it eliminated the errors, but now I would like to delete the directories
    C:\Program Files\Microsoft Configuration Manager and C:\Program Files\SMS_CCM. I am assuming I would get more errors since the one service, SMS Agent Host points to a file in one. I guess I will have to modify the registery. Any other options to get these to properly uninstall?

  6. I followed the above instructions and restarted the server. I received the following errors:

    Log Name: System
    Source: Server
    Event ID: 2511
    Level: Warning
    Description:
    The server service was unable to recreate the share AdminUIContentPayload because the directory C:\Program Files\Microsoft Configuration Manager\AdminUIContentPayload no longer exists. Please run “net share AdminUIContentPayload /delete” to delete the share, or recreate the directory C:\Program Files\Microsoft Configuration Manager\AdminUIContentPayload.

    I followed ran the commands to delete the share and found 3 other shares that pointed to directories under C:\Program Files\Microsoft Configuration Manager and stopped sharing them.

    Also received these errors:

    Log Name: Application
    Source: WDSPXE
    Event ID: 259
    Level: Error
    Description:
    An error occurred while trying to load the module from C:\Program Files\Microsoft Configuration Manager\bin\x64\smspxe.dll for provider SMSPXE. If the provider is marked as critical, the Windows Deployment Services server will be shut down.

    Error Information: 0x7E

    Log Name: Application
    Source: WDSPXE
    Event ID: 264
    Level: Error
    Description:
    An error occurred while trying to initialize provider SMSPXE. Because the provider is not marked as critical, the Windows Deployment Services server will continue to run.

    Error Information: 0x7E

    Log Name: Application
    Source: WDSIMGSRV
    Event ID: 268
    Level: Error
    Description:
    The description for Event ID 268 from source WDSIMGSRV cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    If the event originated on another computer, the display information had to be saved with the event.

    The following information was included with the event:

    0x43

  7. I have a scenario where i have mistakenly installed CAS instead of a Primary site which led me to have to uninstall CAS using the method above. Is there anything I need to do in relation to the prerequisites (SQL, WSUS) before reinstalling as a Primary site? or would it be better to blow away the VM and start from scratch?
    Thanks

  8. Avatar photo COLIN SEARLE says:

    This is a great site – all actions are very clearly written and very accurate. Well done to you Mr Desai.