@sebastian-roth Oh yeah, edit the DB directly… Why didn’t i thinked about this!? Thanks for this detailed answer, but i still think that a snapin would be better for this.
I think I just need to switch of the domain join then apply a batch something like this:
REM This need because %hostname% isn't accesible by default FOR /F "usebackq" %%i IN (`hostname`) DO SET myHostname=%%i REM This should remove the current computer from the domain netdom remove %myHostname% /d:mydomain /ud:mydomain\admin /pd:password /force /reboot
or a powershell script with the cmdlet
Also need to delete the computers from the AD just to clear up everything.
I will post later if I succesfully made it.