Prajwal Desai

SCCM | ConfigMgr | Intune | Windows 11 | Azure

  • Home
  • Cloud
    • Autopilot
    • Azure
    • Endpoint Analytics
    • Intune
    • PowerShell
    • Teams
    • Windows 365
  • Microsoft
    • Active Directory
    • Group Policy
    • SCCM
    • SCOM
    • Windows 10
    • Windows 11
    • Windows Server
    • WSUS
  • Software
  • Forums
  • Newsletter
  • Contact
Notification Show More
Latest News
Fix Windows Autopilot Reset Error 0x80070032
Fix Windows Autopilot Reset Error 0x80070032
Autopilot Intune
Windows activation error 0xc004c020
Fix: Windows Activation Error 0xC004C020 with 2 Easy Methods
Windows 11 Windows 10
Find the Package ID of SCCM Application
3 Best Ways to Find the Package ID of SCCM Application
SCCM
SCCM Updates Install Error 0x800b0109 0x8024b303
Fix: SCCM Updates Install Error 0x800b0109 | 0x8024b303
SCCM
Disable Windows Hello for Business using Intune ftimg
Disable Windows Hello for Business using Intune – Comprehensive Guide
Intune Autopilot
Aa

Prajwal Desai

SCCM | ConfigMgr | Intune | Windows 11 | Azure

Aa
Search
  • Home
  • Cloud
    • Autopilot
    • Azure
    • Endpoint Analytics
    • Intune
    • PowerShell
    • Teams
    • Windows 365
  • Microsoft
    • Active Directory
    • Group Policy
    • SCCM
    • SCOM
    • Windows 10
    • Windows 11
    • Windows Server
    • WSUS
  • Software
  • Forums
  • Newsletter
  • Contact
Follow US

Home » SCCM » Uninstall SCCM Primary Site | Remove ConfigMgr Primary Site

SCCM

Uninstall SCCM Primary Site | Remove ConfigMgr Primary Site

By Prajwal Desai 1 View 9 comments August 7, 2022 5 Min Read

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:

- Advertisement -
Ad image
  • 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

Sign Up For Weekly Newsletter

Get the most recent information on Configuration Manager, Intune, Windows 11, Windows 365, Autopilot, Azure, Software Reviews, and much more by subscribing to the newsletter.
By signing up, you agree and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share this Article
Facebook Twitter Copy Link Print
Avatar photo
By Prajwal Desai
Follow:
Prajwal Desai is a Microsoft MVP in Enterprise Mobility. He writes articles on SCCM, Intune, Configuration Manager, Microsoft Intune, Azure, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.
Previous Article SCCM 1806 Hotfix KB4346645 Install New SCCM 1806 Hotfix KB4346645
Next Article teen hacks apple servers Teen Hacked Apple Servers and Stole 90GB of Secure Files
9 Comments 9 Comments
  • Avatar photo Roger says:
    April 7, 2022 at 1:53 am

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

    Reply
  • Avatar photo j.black says:
    December 7, 2020 at 11:29 pm

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

    Reply
  • Avatar photo Pankaj says:
    January 12, 2020 at 7:07 pm

    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

    Reply
  • Avatar photo j. gonya says:
    November 27, 2019 at 4:03 am

    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?

    Reply
  • Avatar photo j. gonya says:
    November 27, 2019 at 1:55 am

    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?

    Reply
  • Avatar photo j. gonya says:
    November 27, 2019 at 1:22 am

    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

    Reply
  • Avatar photo Fullause says:
    November 22, 2019 at 1:12 pm

    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

    Reply
  • Avatar photo COLIN SEARLE says:
    October 22, 2019 at 6:09 pm

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

    Reply
    • Avatar photo Prajwal Desai says:
      October 23, 2019 at 4:41 pm

      Thank you..

      Reply

Leave a Reply Cancel reply

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

Recast Sponsored AD
Ad image
Patch My PC Sponsored AD
Ad image

Latest Articles

Fix Windows Autopilot Reset Error 0x80070032
Fix Windows Autopilot Reset Error 0x80070032
Autopilot Intune
Windows activation error 0xc004c020
Fix: Windows Activation Error 0xC004C020 with 2 Easy Methods
Windows 11 Windows 10
Find the Package ID of SCCM Application
3 Best Ways to Find the Package ID of SCCM Application
SCCM
SCCM Updates Install Error 0x800b0109 0x8024b303
Fix: SCCM Updates Install Error 0x800b0109 | 0x8024b303
SCCM
Subscribe to Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

You Might Also Like

Find the Package ID of SCCM Application
SCCM

3 Best Ways to Find the Package ID of SCCM Application

By Prajwal Desai
SCCM Updates Install Error 0x800b0109 0x8024b303
SCCM

Fix: SCCM Updates Install Error 0x800b0109 | 0x8024b303

By Prajwal Desai
ConfigMgr Technical Preview 2302 New Features
SCCM

ConfigMgr Technical Preview 2302 New Features | Baseline Version

By Prajwal Desai

Removed from reading list

Undo
Welcome Back!

Sign in to your account

Lost your password?