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:
| Version | Folder | File |
|---|---|---|
| SQL Server 2025 | 170 | sqlmgmprovider.mof |
| SQL Server 2022 | 160 | sqlmgmprovider.mof |
| SQL Server 2019 | 150 | sqlmgmproviderxpsp2up.mof |
| SQL Server 2017 | 140 | sqlmgmproviderxpsp2up.mof |
| SQL Server 2016 | 130 | sqlmgmproviderxpsp2up.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
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
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?
Do I need to restart SQL Server after mofcomp?
Which file do I use with several versions installed?
It says access denied, 0x80070005.
Related
- SQL Server Configuration Manager, where to find it and what it is for
- SQL Server Service Will Not Start, when it is the engine that is down
- Enabling TCP Connections in SQL Server
Leave a Reply