0X000008E6

Fix NERR_DelComputerName 0X000008E6: computer name not deleted

This error means Windows couldn't remove a computer name entry from a domain or workgroup. The fix is a registry clean-up followed by a proper leave-join sequence.

You clicked delete. Nothing happened. Or you got NERR_DelComputerName.

That's frustrating. The error 0X000008E6 (also NERR_DelComputerName) pops up when Windows tries to remove a computer name entry from its local registry or from a domain's Active Directory but can't finish the job. Usually happens during a rename, a domain leave, or a cleanup script. Let's cut to the fix.

The fix — clean the stale entry directly

  1. Open Registry Editor (regedit) as Administrator.
  2. Go to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  3. Look for the string value NV Hostname. If it still holds the old computer name you're trying to delete, right-click → Delete it. Yes, just delete.
  4. Now go to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName
  5. Check ComputerName inside. If it's the old name, change it to the new name you want. If you're leaving a domain entirely and want to go workgroup, set it to something simple like DESKTOP-FIX.
  6. Same check in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName — adjust if needed.
  7. Close regedit. Open an Admin Command Prompt and run:
    netdom renamecomputer %COMPUTERNAME% /newname:YOUR-NEW-NAME /reset
    (replace YOUR-NEW-NAME). Or if you're leaving a domain, do:
    netdom remove %COMPUTERNAME% /domain:yourdomain.local /userd:admin /passwordd:*
  8. Reboot. The error should be gone.

Why this works

The core of 0X000008E6 is a mismatch between what Windows thinks its computer name is (stored in registry) and what the domain controller or local network expects. The NV Hostname value is the persistent “non-volatile” copy — it survives reboots. If that's still pointing to an old name that doesn't exist in AD anymore (or was manually deleted by an admin), the rename/delete operation trips over itself. The API call that deletes the computer name (NetServerComputerNameDel) fails because it finds a reference it can't resolve. By scrubbing that stale registry entry first, you give Windows a clean slate. The netdom command then re-establishes a proper consistent state.

Less common variations

Still failing after registry edit

If the error persists, the issue might be in Active Directory itself. Some domain admin might have deleted the computer object manually from AD without disjoining it first. That leaves a “ghost” reference. You'll need a domain admin to use ADSI Edit (ADSIEdit.msc) and check CN=Computers for orphaned objects with the old name. Delete any that match your machine. Then retry step 7.

Error appears during an SCCM or GPO push

Sometimes group policy tries to rename or delete a computer name during a refresh. If you're not actively renaming, this means something in your environment (like a logon script or a scheduled task) is calling NetServerComputerNameDel automatically. Check Task Scheduler under Microsoft\Windows\Networking for any “ComputerNameUpdate” tasks. Disable them, then apply the registry fix above.

Hyper-V or VM clone leftovers

If this error hits a cloned VM, the original VM's name often lingers in the registry NV Hostname even after Sysprep. Sysprep is supposed to clear this, but it doesn't always. Manual deletion (step 3) plus a sysprep /generalize /shutdown rerun fixes it.

Prevention — don't let it happen again

  • Never manually delete a computer object from AD without disjoining the machine first. Use netdom remove or the System Properties GUI. If you do it through ADUC by accident, the next rename will hit this error.
  • Before renaming a domain-joined machine, verify the current computer name matches what's in AD. Run nltest /dsgetdc:yourdomain — if it fails, fix AD first.
  • For scripts that rename computers, always include a registry NV Hostname check before the rename call. A one-liner in PowerShell: Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters' -Name 'NV Hostname'. If it's stale, Remove-ItemProperty it.
  • On workgroup machines, the error is rare. If it shows, you likely have a corrupted profile or a malware leftover that locked the name. A clean registry backup (export the entire ComputerName keys) before any rename gives you a quick rollback.

That's it. No “ensure you” or “it's crucial that”. Just the registry, the command, and a reboot. Save this page — you'll probably need it again when a domain admin sneezes and breaks a computer object.

Related Errors in Windows Errors
0X000003E7 0x000003E7 ERROR_SWAPERROR Fix: Page File Crash 0X00000922 0X00000922 NERR_QueueNotFound – Print queue missing fix 0X80320038 Fix FWP_E_INCOMPATIBLE_AUTH_CONFIG (0x80320038) in Windows Remote Desktop Black Screen: 3 Fast Fixes That Work

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.