How to Uninstall SCCM Primary Site

In this post we will see how to uninstall SCCM primary site. Sometimes you want to try new things because you want to learn something out of it. I would like to post a quote made by Walt Disney here. “We keep moving forward, opening new doors, and doing new things, because we’re curious and curiosity keeps leading us down new paths”.

The first question you would probably ask is why should one uninstall SCCM primary site ?. There could be a situation where you would want to setup new site completely. Or probably get rid of the old primary site that has got tons of issues or it could be something else. Well I have got a big lab setup with just a single SCCM primary site. Now that I wanted to create a new setup, i thought of deleting all the virtual machines. But then, that would be so easy to do. So i thought why not try out uninstall configuration manager site option.

Long back I published a post on performing SCCM site reset. Note that SCCM site reset is different from uninstalling your configuration manager site. Though both options are seen on same screen, however one should use them wisely. If you are looking to perform SCCM Configuration manager site reset, this post will help you. In this post I will cover the steps to uninstall SCCM primary site.

Before you Uninstall SCCM Primary Site

Since you have decided to uninstall SCCM primary site, there are few things that i would like to add here. What if you have a hierarchy with multiple sites ?. Will you decommission primary site server directly ?. The answer is No. In such cases 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 of all remove secondary sites attached to primary sites.
  2. Next remove 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 administrations site.

As mentioned earlier, i have got just one primary site in my lab setup. Do not worry about what roles are installed on site server, we are just going to uninstall configuration manager primary site using simple steps.

How to Uninstall SCCM Primary Site

To uninstall SCCM Primary Site, let’s follow the steps. 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

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

How to Uninstall SCCM Primary Site

There are setup options and some of the them are greyed out. Select last option Uninstall this Configuration Manager Site. Click Next.

How to Uninstall SCCM Primary 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 primary site completely. So on the confirmation box click Yes.

How to Uninstall SCCM Primary Site

Now the wizard begins to uninstall primary site. There are many steps involved while uninstalling SCCM primary site. You can click View Log and that opens ConfigMgrSetup.log file. In my lab setup the primary site got uninstalled in 14 minutes.

How to Uninstall SCCM Primary Site

The ConfigMgrSetup.log file records the uninstall process. At the end of the log file you should see Completed Configuration Manager Server Setup – Uninstallation.

How to Uninstall SCCM Primary Site

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

How to Uninstall SCCM Primary Site

Prajwal Desai

Hi, I am Prajwal Desai. For last few years I have been working on multiple technologies such as SCCM / Configuration Manager, Intune, Azure, Security etc. I created this site so that I can share valuable information with everyone.

Related Articles


  1. 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)?

  2. 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

  3. 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?

  4. 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?

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

    Log Name: System
    Source: Server
    Event ID: 2511
    Level: Warning
    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
    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
    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
    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:


  6. 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?

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

Leave a Reply

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

Back to top button