Question: how to restore active directory server 2012?
Answer: Open a command prompt using the blue PowerShell icon on the desktop taskbar, or from the Start screen.
In the PowerShell console window, type bcdedit /set safeboot dsrepair and press Enter.