w10install/tools/adleave.cmd
Michael H.G. Schmidt 1ee3c54a5d tools move
2023-12-03 16:49:33 +01:00

12 lines
272 B
Batchfile

@echo off
call check-for-admin
if %ERRORLEVEL% neq 0 exit /b
echo ####### %0 #######
echo LEAVING domain ...
powershell -Command "Remove-Computer -Restart -PassThru -UnJoinDomainCredential $env:username -Confirm:$false -Force:$true"
echo ####### %0 #######