IT Diary (Nov 2022)

Upgrade from Windows Server 2012R2 to Server 2019/2022 deletes WMI namespaces

If you run an in-place upgrade from Windows Server 2012R2 on a ConfigMgr server, you may see that the WMI namespaces root\SMS, root\ccm, root\SCCMDP, and root\windows\sqlserver were deleted. The ConfigMgr console may not open and ConfigMgr will not work properly. In case of Distribution Points, you may see that content distributions don’t work because of an error when accessing root\SCCMDP (see distmgr.log). The client will also be broken. When you try to upgrade the SQL Server, you may also run into a WMI error, root\windows\sqlserver may be missing.

OS in-place upgrades on ConfigMgr servers are a supported scenario. However, the WMI issue seems to be very common. I’ll try to outline the options that you have if you are affected.

On Distribution Points:

  1. To validate that root\SCCMDP is missing: Open a cmd with proper permissions, run wbemtest and connect to the namespace ccm\sccmdp. You should get an error.
  2. Follow the steps to recover the DP provided by Trevor Jones [link].

On a Primary Site Server (no hierarchy):

Option 1: Open a cmd and recompile the mof files in [ConfigMgr install location]\bin\X86.

Example: mofcomp smsprov.mof

Since this doesn’t fix the SQL Server issue, I decided to run a recovery. Note that a site reset doesn’t recover WMI and thus doesn’t help.

Option 2: Uninstall SQL, ConfigMgr and run a recovery. The steps below are just a high-lever description.

  1. To validate that root\sms is missing: Open a cmd with proper permissions, run wbemtest and connect to the namespace ccm\sms. You should get an error. You can also use the freeware tool WMIExplorer to confirm. You should have seen that the console isn’t able to connect.
  2. If you are certain that you are affected by the issue described above, prepare a recovery. You might want to make a copy of the last ConfigMgr backup to avoid that it gets overwritten when ConfigMgr is running again.
  3. Look through the Microsoft recovery documentation [link]. Make sure you have installation sources for SQL server (same edition) available. Remove SQL Server and the ConfigMgr site server by running an uninstall from Programs and Features.
  4. Install SQL Server. It is supported to use a higher version than the one you had installed [link].
  5. Start the SCCM recovery by running splash.hta from the backup. Click Install. In the setup wizard, select Recover a site. Note that a site reset is an option but doesn’t help since it doesn’t restore WMI.
  6. Afterwards, reinstall Reporting Services and WSUS.
  7. I noticed that after the recovery, the content of SMSPKGSIG was missing. You may also have to recover it from a backup. Alternatively, you can update the content which updates the version and recreates the package in the content libraries – this unfortunately means a re-replication to all DPs.

To avoid this trouble, consider setting up a parallel server with the latest OS and SQL version and the requires roles, features and components (like ADK). Copy the sources, give the new server the name of the old one and recover ConfigMgr from a backup. That’s a supported scenario as well and potentially smoother.


Upgrade on-premises infrastructure that supports Configuration Manager

Upgraded SCCM Distribution Point and SCCMDP namespace is missing

OS Upgrade (2012 R2 to 2016) on Primary Site Server nukes Root\SMS

In-place upgrade of ConfigMgr site server from Windows 2012 R2 to 2019

Steps missing for in-place OS upgrade of Server 2012 R2 to 2016/2019 for distribution points.