# CMD: FSMO Role Transfer

## Prerequisite Check

Open **Event Viewer** and check ***Applications and Service logs*** for errors in the following:

* ADWS
* DFS Replication
* Directory Service
* DNS Server

If these services are good, then it is safe to proceed with FSMO Role transfer.

## Transfer FSMO roles using NTDSUtil tool

1. Open **Command Prompt** with elevated privileges (**Run as Administrator**)
2. Type **ntdsutil** and press **Enter**
3. Type **roles** and press **Enter**
4. Type **connections** and press **Enter**
5. Type the following:
   1. **connect to server "SERVERNAME"** and press **Enter**
   2. Where "**SERVERNAME"** is the name of the server FSMO roles are being transferred to

This sets the FSMO role transfer location. Now, one by one, each role needs to be transferred using the command(s) below. After each **Enter** at the end of each command, a pop-up confirmation window will appear - click **Yes** to continue.

```
transfer schema master >>> press Enter
transfer rid master >>> press Enter
transfer naming master >>> press Enter
transfer pdc >>> press Enter
transfer infrastructure master >>> press Enter

```

When each role has been transferred to new server, it is safe to quit out of the NTDSUtil tool. Type **quit** and press **Enter**.

Once these roles are confirmed on the new server, the old server can be decommissioned or features/roles removed (i.e. Active Directory).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.bryanpcoleman.com/microsoft-windows/fsmo-role-transfer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
