I recommend when decommissioning a site server to first remove any additional roles such as DP before uninstalling the site. The site removal will move through these motions for you but I just remove the roles before hand out of habit. This post will assume boundaries have already been updated.
From the console after you removed your additional system roles (such as DP) it is time to uninstall the site server.
When to Uninstall:
Use this option to remove a functional secondary site that is accessible from the network. This option uninstalls Configuration Manager from the secondary site server, and then deletes all information about the site and its resources from the Configuration Manager hierarchy. If Configuration Manager installed SQL Server Express as part of the secondary site installation, Configuration Manager will uninstall SQL Express when it uninstalls the secondary site. If SQL Server Express was installed before you installed the secondary site, Configuration Manager will not uninstall SQL Server Express.
When to remove:
A site has failed to install or when the site remains visible in the ConfigMgr console after you’ve uninstalled it
How to Monitor:
On your secondary site server you can monitor this from C:ConfigMgrSetup.log. The site server uninstallation process is roughly as follows.
1. ConfigMgr2012 Setup is started by system with command line options /deinstall / msg2parent /nouserinput
2. Information is checked, this will be things such as the following. FQDN, OS is verified, Checks for existing setup information, existing SQL information, existing configmgr installation and version number, etc.
3. removes SQL alias for sccm
4. Starts uninstallation of secondary site by first cleaning up SQl server replication data, start uninstallation of local dp (if applicable) Remove content SCCMContentLib, SMSPKG, SMSPKGF$, SMSSIG$ directories from the server. The process will also move through list of all SCCM Services and stop/uninstall them if present and then stop WMI
NOTE: After services/connections are removed you will see a number of redlines in the log file. This is only b/c connection can not be established which is expected right after stopping WMI
5. Connect to database, drop schema SMS_SiteSystemToSQLConnection, drop database, and uninstall SQL (if applicable)
NOTE: ONLY If your admin installed SQL instead of letting SCCM perform the uninstall action during site install you will see this message
6. Attempt unregister list of Binaries
7. Attempt delete remaining folders/files from within the configmgr installation directory
8. remove registry keys, restart WMI, and other services then complete uninstallation of Configuration Manager Site.
This is great according to the log files the site is completely uninstalled, but why is nothing changed in the console after 3 hours?
This is still showing Deleting even after restarting the old secondary site and primary server. Do not worry because this fix is something that I have ran into before. We will have to use the hierarchy Maintenance Tool (Preinst.exe)
1. on primary site server launch command prompt as administrator > Navigate installation location of configmgr
2. run the following command
preinst.exe /delsite SUF
After this command executes successfully refresh the console and search for the site server you will see it is gone.
of course in your environment you might have configmgr installed on a different drive, and different site codes so modify where necessary.
In a future blogpost I will cover the full process to convert a secondary site server into a DP. This is in efforts to meet pre-req check on the ongoing hierarchy upgrade to 1610. The reason these secondary sites will fail is b/c the current version of SQL express is not compatible.
ALSO SEE : Things to check after site recovery