w10install/tools/adleave.cmd

12 lines
272 B
Batchfile
Raw Permalink Normal View History

2023-12-03 14:04:37 +01:00
@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 #######