During one of the activities with the demo environment I faced an issue that I was unable to promote any server to DC, and was giving the errors:
ADPrep execution failed –> System.ComponentModel.Win32Exception (0x80004005): A device attached to the system is not functioning.
Check the log files in the C:\Windows\debug\adprep\logs\20220518075032 directory for detailed information.