Disable AD users with script

@echo off
setlocal
for /f “eol=; tokens=1,* delims=;” %%i in (desabilitados.csv) do (
set user=%%i
call :segue
)
endlocal
:segue
dsquery user -samid %user% | dsmod user -disabled yes
dsquery user -samid %user% | dsmove -newparent “OU=Desabilitados,DC=teste,DC=interno”

Checking Root Account Status

  Checking Local Root Account Status Run sudo passwd -S root : Look for the status letter in the output. An L means the account is locked (...

Mais vistos