Hello Merkouris Bouchlas,
What has happened here is that the GPO you applied contained a security baseline setting that directly impacted logon capability on the domain controller. Microsoft Defender baselines often include policies such as “Deny log on locally” or “Deny log on through Remote Desktop Services” for certain groups, or restrictive User Rights Assignments that inadvertently block administrators from signing in. Once that policy is applied to the DC, you can be locked out entirely.
The immediate remediation is to access the domain controller in Directory Services Restore Mode (DSRM). Reboot the server, press F8, and choose DSRM. Log in with the DSRM password you set when promoting the DC. From there, you can either disable the problematic GPO or edit the SYSVOL copy of the policy. Another option is to boot into Safe Mode with Networking, log in with the DSRM account, and use gpmc.msc or regedit to roll back the change. If you have another domain controller that is still accessible, you can also modify or delete the GPO from that system, and replication will remove the lockout policy from the affected DC.
If you cannot access Group Policy Management, you can manually move or rename the GPO folder under \<domain>\SYSVOL<domain>\Policies{GUID} so that it no longer applies. Once the DC reboots, it will stop enforcing the locked policy. After regaining access, carefully re‑apply the Defender baseline but exclude the settings that deny interactive or RDP logon for administrators.
In short, you need to use DSRM or Safe Mode to bypass the GPO enforcement, then roll back or delete the offending policy. This is the supported way to recover from a lockout caused by GPO misconfiguration on a domain controller.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Domic Vo.