All Products
Search
Document Center

:Resolve the 'Server Manager is collecting inventory data' issue when adding roles and features

Last Updated:Nov 11, 2025

Problem description

When you use Server Manager to Add roles and features in Windows Server, the process hangs. The UI continuously displays the "Server Manager is collecting inventory data" message, preventing you from proceeding.

Cause

Server Manager uses the Windows Management Instrumentation (WMI) service to query and collect server configuration information. This issue occurs when the WMI service malfunctions or when its core database, the WMI repository, becomes corrupted.

Solution

To fix this issue, rebuild the WMI repository. This procedure repairs the WMI service, allowing Server Manager to collect inventory data correctly.

Important

This procedure involves rebuilding a core system component. To back up your data, create a snapshot for your Elastic Compute Server (ECS) instance.

  1. Log on to the ECS instance.

    1. Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.

    2. Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.

  2. Open Command Prompt as administrator.

    Click Start, type cmd, right-click Command Prompt, and then select Run as administrator.

  3. Repair the WMI service.

    1. To prevent the WMI service from restarting or being accessed by other applications during the repair process, stop and disable the service.

      sc config winmgmt start= disabled
      net stop winmgmt /y
    2. Back up the WMI repository files.

      cd %windir%\system32\wbem
      ren repository repository-backup
    3. Re-register all WMI-related dynamic-link library (DLL) files.

      for /f %s in ('dir /b *.dll') do regsvr32 /s %s
    4. Change the WMI service startup type to Automatic and then start the service.

      sc config winmgmt start= Auto
      net start winmgmt
    5. Recompile all MOF and MFL files that are not marked for uninstallation and load them into the newly created WMI repository.

      dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s
  4. Restart the instance. Verify that the Add roles and features works as expected.