1- Demote the DC using the dcpromo /forceremoval.
2- Remove the server from the PDC using Active Directory Users and Computers, flagging the “this domain controller is pemanently offline and can no longer be demoted using the active directory domain services installation wizard (DCPROMO)” checkbox. It is not necessary to clean with ntdsutil the metadata. These operations are included with the deletion of the domain controller from the GUI.
3- Remove the AD role.
4- Reinstall the AD role.
5- Promote the DC using dcpromo
If you have problem after attaching manually an existing virtual disk to Windows Server 2012 / 2012 R2 probably you have the IsManualAttach of the virtual hard disk setted to 0 (zero).
To verify this open a PowerShell window and type this command: Get-VirtualDisk. If IsManualAttach is equal to 0 every time you restart the pc the virtual disk will not be online.
To resolve the “issue” simply type : Set-VirtualDisk friendlynameofthedisk -IsManualAttach 0
Where friendlynameofthedisk is the friendly name you found when you have verified the disks with the command Get-VirtualDisk.
That’s all falks!