Cannot Connect to WMI Provider: SQL Server Configuration Manager Will Not Open

🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: Server & Configuration

SQL Server Configuration Manager
Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 and later servers with SQL Server Configuration Manager. Invalid namespace [0x8004100e]
⚡Despite the wording, this is rarely permissions. Invalid namespace means the WMI provider Configuration Manager needs is no longer registered, usually after another SQL Server version was uninstalled. Re-register it with mofcomp from an elevated prompt, restart WMI, and reopen it.

Configuration Manager opens straight into this box and shows nothing. SQL Server itself is fine and still running; it is the management tool that has lost its way in. The error text is Microsoft’s; the file paths and namespace below were checked on a SQL Server 2025 instance.


Why It Happens

Configuration Manager reads services and network settings through a WMI provider that SQL Server registers in a namespace named for its version: root\Microsoft\SqlServer\ComputerManagement17 on SQL Server 2025. Uninstalling an instance or a different version from the same machine can unregister it, and then the namespace is simply not there, which is what 0x8004100e means. If the code at the end is 0x80070005 instead, that one really is access denied: open Configuration Manager as an administrator.


The Fix

Open PowerShell as administrator and run these two commands. For SQL Server 2025:

# 1. Re-register the WMI provider (SQL Server 2025 = folder 170)
mofcomp "${env:ProgramFiles(x86)}\Microsoft SQL Server\170\Shared\sqlmgmprovider.mof"

# 2. Restart WMI so Configuration Manager picks it up
Get-Service winmgmt | Restart-Service -Force

Then reopen Configuration Manager. For another version, swap the folder and file name from this table:

VersionFolderFile
SQL Server 2025170sqlmgmprovider.mof
SQL Server 2022160sqlmgmprovider.mof
SQL Server 2019150sqlmgmproviderxpsp2up.mof
SQL Server 2017140sqlmgmproviderxpsp2up.mof
SQL Server 2016130sqlmgmproviderxpsp2up.mof

The file name changed in SQL Server 2022. Most guides still give sqlmgmproviderxpsp2up.mof, which is right for 2019 and earlier but is not on a 2022 or 2025 install: on the lab instance the 170 folder holds sqlmgmprovider.mof and nothing else.


Not Sure Which File You Have?

This lists every provider file on the machine, in both Program Files folders, because on some installs the shared components are not under the x86 one:

Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft SQL Server", "$env:ProgramFiles\Microsoft SQL Server" `
    -Recurse -Filter *.mof -ErrorAction SilentlyContinue | Select-Object FullName
The lab instancereal example output, not something to copy
FullName C:\Program Files (x86)\Microsoft SQL Server\170\Shared\sqlmgmprovider.mof

Nothing found means the file itself has gone: run SQL Server setup in repair mode to put it back. Microsoft’s troubleshooting article covers the same steps.


Check It Worked

The namespace should exist again. This is the read-only check, and the same query SQL Server Configuration Manager uses to show the settings without the GUI:

Get-CimInstance -Namespace root\Microsoft\SqlServer -ClassName __NAMESPACE | Select-Object Name
The lab instance, with the provider registeredreal example output, not something to copy
Name ServerEvents ComputerManagement17

ComputerManagement17 in the list means Configuration Manager will open. The number is your version: 16 for 2022, 15 for 2019.


Common Questions

Is SQL Server down when this appears?
No. Only the management tool is affected. Check the service in Services or with the PowerShell query above; the instance keeps running.
Do I need to restart SQL Server after mofcomp?
No. Restart the WMI service, not SQL Server, then reopen Configuration Manager.
Which file do I use with several versions installed?
The one for the version whose Configuration Manager will not open. If more than one fails, run mofcomp for each.
It says access denied, 0x80070005.
That is a permission problem, not a missing provider. Run Configuration Manager as an administrator.

Related

Comments

Leave a Reply

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