# Enable Windows Directory Services Restore Mode (DSRM)

Boot with Windows Boot CD/ISO and when you see **Install now**, click on **Repair your computer → Troubleshoot → Command Prompt.**

- Find the Windows volume (usually `C:`):
    
    
    - `dir C:\Windows` to confirm it exists.<span aria-label="Directory Services Restore Mode: DSRM password reset, recover ..." class="inline-flex" data-state="closed">​</span>
- Tell Windows to boot into **Directory Services Restore Mode** (DSRM) on the next boot:
    
    
    - `bcdedit /set {default} safeboot dsrepair`<span class="inline-flex" data-state="closed">​</span>

Close the Command Prompt and reboot the machine. On next boot, the DC should start in **Directory Services Restore Mode**. Log on using the **DSRM password** you set when promoting the DC (local, not domain). Enter the username as .\\\\Administrator.

Once you’ve fixed whatever issues and want normal startup again:

- From an elevated Command Prompt inside Windows on that DC, run:
    
    
    - `bcdedit /deletevalue {default} safeboot`<span class="inline-flex" data-state="closed">​</span>

Then reboot; it will go back to normal DC mode.