# Renaming NETBIOS name of Active Directory Error

Recently I was testing renaming the NETBIOS name of an Active Directory domain. While this process is fairly easy, there are a few gotcha’s, and before one would like to rename their domain or NETBIOS name, serious testing is required to be sure everything works after rename. In the end, if something goes wrong, the rollback will not be a walk in a park. It will hurt, and it will eat your time. So there was I going thru the usual steps.

blog

16 Feb 2020 pl

![Renaming NETBIOS name of Active Directory Error](/wp-content/uploads/2020/02/img_5e4314e132318.png)

[Zobacz obrazy (2)](#pf-content-image-1-0)

Recently I was testing renaming the NETBIOS name of an Active Directory domain. While this process is fairly easy, there are a few gotcha's, and before one would like to rename their domain or NETBIOS name, serious testing is required to be sure everything works after rename. In the end, if something goes wrong, the rollback will not be a walk in a park. It will hurt, and it will eat your time. So there was I going thru the usual steps.

- Execute **rendom /list**
- Edit **Domainlist.xml** and change NetBIOS
- Run **rendom /showforest** to confirm everything works
- Run **rendom /upload** to upload NetBIOS changes
- Run **rendom /prepare** to prepare
- Run **rendom /execute** to start renaming process (all DC's for whole forest reboots at the same time)
- Run **gpfixup /olddns:evotec.xyz /newdns:evotec.xyz**
- Run **gpfixup /oldnb:OLDNB /newnb:NEWNB**
- Fix possible places where Netbios name is used
- Restart at least two times all workstations/servers
- Run **rendom /clean** to remove references to the old name
- Run **rendom /end** to end rename of the domain

And the last step was an unpleasant surprise. **Rendom /End** error.

[!\[Wiersz polecenia pokazujący błąd rendom /end związany z rolą Domain Naming Master podczas zmiany nazwy Active Directory.\](/wp-content/uploads/2020/02/img_5e4314e132318.png)](/wp-content/uploads/2020/02/img_5e4314e132318.png)

> C:\Users\Administrator>rendom /end Failed to delete rename script on the DN: CN=Partitions,CN=Configuration,DC=test,DC=lab on host AD-test.test.lab. 00002077: SvcErr: DSID-030F114D, problem 5003 (WILL_NOT_PERFORM), data 0 : Cannot complete this function. :1003

Before I give you the solution to this error, please keep in mind the above steps, while easy to follow, require testing. I would never rename **NetBIOS** or **domain name** without testing on a test environment that is a copy of the original domain with a handful of servers/computers to replicate identical conditions. You shouldn't either.

### 💡 Rendom /End – Solution

To correct this problem, we need to move the **Domain Naming Master** function to another DC and then return the function to the original DC. Once completed, the step **rendom /end** should be able to complete. In my case, I had only one DC (test lab), but it's enough to try and move **Domain Naming Master** role to the very same DC.

```powershell
Move-ADDirectoryServerOperationMasterRole -OperationMasterRole DomainNamingMaster -Identity MyDC.domain.local
```

[!\[PowerShell przenoszący rolę DomainNamingMaster na inny serwer za pomocą Move-ADDirectoryServerOperationMasterRole.\](/wp-content/uploads/2020/02/img_5e4315019e452.png)](/wp-content/uploads/2020/02/img_5e4315019e452.png)

Moving the role of **DomainNamingMaster** fixed the issue and allowed me to finish my rename process.

## Powiązane projekty

Projekty powiązane z tagami, kategoriami i treścią tego wpisu.

[Wszystkie projekty](/projekty/)

Trwa dopasowywanie projektów...

[Powrót do bloga](/blog/)

## Powiązane wpisy

- [Check an API write after a PowerShell timeout](/blog/verify-uncertain-api-outcomes-powershell/)
- [Inspect and convert mixed Office archives with PSWriteOffice](/blog/inspect-and-convert-mixed-office-archives-pswriteoffice/)
- [Compose PDF reports and automate page workflows with PSWriteOffice](/blog/automate-pdf-reports-and-page-workflows-pswriteoffice/)

<!-- PowerForge markdown artifact sha256:584456E897992E6749D91A142751325CEE20A47A9743E46844E8683CCB5093FD -->
