0X000020B0

Active Directory rename fails: ERROR_DS_CROSS_NC_DN_RENAME (0X000020B0)

Windows Errors Intermediate 👁 7 views 📅 May 26, 2026

This error hits when you try to rename a user or group across different domain naming contexts. The fix is performing the move within the same container first.

You're stuck on 0X000020B0

You tried to rename a user, group, or OU in Active Directory Users and Computers, maybe using drag-drop or ADMT, and got ERROR_DS_CROSS_NC_DN_RENAME. The error text says "Modification of a distinguished name across a naming context is not permitted." That's technically correct, but it doesn't tell you what to do. Let's fix it.

The fix: two-step move, then rename

What's actually happening here is you're trying to rename an object to a DN that falls under a different naming context (NC). In AD, each domain has its own NC — DC=mydomain,DC=com is one, DC=otherdomain,DC=com is another. You can't rename an object across NCs in one shot. AD blocks it at the protocol level.

Here's the fix that works every time on Windows Server 2012 R2 through 2022:

  1. Move the object to the target container within the same domain using ADSI Edit or PowerShell. This avoids crossing NCs.
  2. Then rename the object to whatever DN you actually wanted.

For example, say you want to rename CN=jsmith,OU=Users,DC=oldco,DC=com to CN=jsmith,OU=Staff,DC=newco,DC=com. That crosses NCs (oldco vs newco). Instead:

Move-ADObject -Identity "CN=jsmith,OU=Users,DC=oldco,DC=com" -TargetPath "OU=Staff,DC=oldco,DC=com"
Rename-ADObject -Identity "CN=jsmith,OU=Staff,DC=oldco,DC=com" -NewName "CN=jsmith-updated"

Now the DN is CN=jsmith-updated,OU=Staff,DC=oldco,DC=com — still in the same domain NC. If you need it in DC=newco, you must use ADMT or a cross-domain move tool, which handles object migration properly (SID history, ACLs, etc.). The rename cmdlet flatly refuses cross-NC operations.

PowerShell one-liner for the impatient

$obj = Get-ADUser jsmith
Move-ADObject $obj.DistinguishedName -TargetPath "OU=Staff,DC=oldco,DC=com"
Rename-ADObject ($obj.DistinguishedName -replace 'OU=Users','OU=Staff') -NewName "jsmith-updated"

That moves then renames. Note the -replace trick to build the intermediate path — it's lazy but works if the OU structure is simple.

Why this works

The core reason step 1 is required: AD stores naming contexts as separate database partitions. A rename that changes the NC suffix would require rewriting the object's GUID-based reference across partitions — something LDAP's modifyDN operation explicitly forbids. The error code 0X000020B0 maps to LDAP_UNWILLING_TO_PERFORM with a subcode indicating cross-NC violation. Microsoft's AD implementation follows RFC 4511 strictly here: you can only rename within the same NC.

By moving into the target container first (still in the same NC), you avoid that check. Then the rename only changes the RDN, which stays inside the same NC partition. Two separate operations, each legal on its own.

Less common variations of the same issue

Scenario A: Renaming a GPO
If you rename a GPO via Group Policy Management Console and get 0X000020B0, it's because you're trying to rename it and move it across domains in one step. GPMC sometimes does this when you paste a linked GPO into another domain. Fix: unlink the GPO, copy it to the target domain (which creates a new GUID), then rename the copy.

Scenario B: ADMT migration failing on rename
ADMT (Active Directory Migration Tool) uses rename operations internally. If the target domain has a conflicting object with the same SAMAccountName, ADMT tries to rename the source object to a temporary name. If that temp name crosses NCs (rare but happens when you migrate inter-forest), same error. Workaround: manually rename the source object to a unique name before starting the migration.

Scenario C: Third-party LDAP tools (Softerra, LDP)
Tools that let you type arbitrary DNs in rename dialogs will trigger this if you mistype the DN's domain component. For example, forgetting DC=com at the end of the target DN. The fix: double-check the base DN of your target container. Use Get-ADDomain to fetch the correct DN suffix.

Prevention going forward

Don't rename across domains. Ever. If you need an object in another domain, migrate it using ADMT or New-ADObject with export/import of attributes. Rename is for organizational changes within the same domain.

If you must rename a critical object (like an admin account), test it first in a lab with a copy of the object. A botched rename can leave orphaned ACL references or broken group memberships that take hours to untangle. The time you save by not reading this article is not worth the headache of rebuilding permissions on 500 file servers.

Finally, always use explicit paths in PowerShell — don't rely on default naming contexts from snap-ins. Get-ADObject -Identity "CN=foo,DC=bar,DC=com" is safer than piping from Get-ADUser foo because you control the full DN. When the error reappears, you'll know exactly which two NCs are crossing.

Was this solution helpful?