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
- Open Registry Editor (regedit) as Administrator.
- Go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters - 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. - Now go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName - Check
ComputerNameinside. 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 likeDESKTOP-FIX. - Same check in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName— adjust if needed. - Close regedit. Open an Admin Command Prompt and run:
(replace YOUR-NEW-NAME). Or if you're leaving a domain, do:netdom renamecomputer %COMPUTERNAME% /newname:YOUR-NEW-NAME /resetnetdom remove %COMPUTERNAME% /domain:yourdomain.local /userd:admin /passwordd:* - 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 removeor 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 Hostnamecheck 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-ItemPropertyit. - 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
ComputerNamekeys) 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.