0X0000053E

Fixing ERROR_SERVER_NOT_DISABLED (0X0000053E)

Server & Cloud Intermediate 👁 3 views 📅 Jul 13, 2026

This error means a server's still enabled when you're trying to disable it. The fix is usually stopping dependent services or disabling it via the registry.

Cause #1: Dependent services won't let go

The culprit here is almost always services that depend on the Server service (LanmanServer). The Server service won't stop or get disabled if something's still using it. Common troublemakers are the SMB service, Netlogon, or any file-sharing services.

Here's the fix — stop the dependencies first. Open an admin Command Prompt and run:

net stop lanmanserver /y

That /y flag tells it to stop all dependent services automatically. If it works, you'll see a list of services getting stopped, then the Server service itself. If it fails with the same error, move to the next step.

Sometimes you need to check what's holding it up. Run:

sc queryex lanmanserver

Look for the DEPENDENCIES line. It lists services that need the Server service. If one of them is running, stop it first. For example:

net stop "SMB 1.0/CIFS File Sharing Support"

Then try disabling the Server service again. This fixes about 80% of cases.

Cause #2: Registry key blocking the disable

If stopping dependencies didn't work, the Server service's registry has probably been locked by a policy or a manual change. The key is hiding here:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer

Open Regedit, go to that path. Look for the Start value. A value of 2 means automatic start, 3 means manual, 4 means disabled. If you see 2 and you want it disabled, change it to 4.

But here's the trick — sometimes a Group Policy overrides this. Check if there's a policy setting under:

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LanmanServer

If you see keys there, especially EnableSMB1Protocol or Start, delete or modify them. Then reboot. I've seen this on Windows Server 2019 and 2022 where a domain policy locks the Server service start type. If it's a company policy, you'll need to talk to your domain admin.

After changing the registry, don't bother with sc config — the registry change is permanent. Just reboot or run:

net stop lanmanserver

Cause #3: Corrupted service or SMB stack

This one's rare but happens after a botched update or a power loss. The service configuration gets corrupted. You'll see the error even after a clean reboot.

First, try rebuilding the service. Run these commands as admin:

sc delete lanmanserver

Then recreate it. But you need the exact parameters. Here's the safe way — use the registry backup. Before deleting, export the key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer

Right-click, Export. Save it. Then delete the key. Reboot. Windows will recreate it with default settings. If the error persists, restore the backup and try the next step.

If the SMB stack itself is broken, reset it:

dism /online /cleanup-image /restorehealth
sfc /scannow

Then reboot. This fixes corrupted system files related to SMB. On Server 2022, I've also seen this happen when the SMB1 feature is partially installed. Check with:

Get-WindowsFeature FS-SMB1

If it's installed and you don't need it, remove it:

Remove-WindowsFeature FS-SMB1

Then disable the Server service again.

Quick-reference summary table

CauseSymptomsFix
Dependent servicesError on net stop or sc confignet stop lanmanserver /y
Registry lockedPolicy overrides, start type staysSet Start to 4, remove policy keys
Corrupted service/SMBError after reboot, SMB1 installedDelete and recreate service, run DISM/SFC

Try these in order. You'll save time skipping the fancy stuff. I've fixed this on Server 2012 R2 through 2022, same pattern every time.

Was this solution helpful?