----------------------------------------------------------------------
@echo off
setlocal
:ok
set pf=%1
set dom=%2
for /F "Tokens=1" %%a in ('dir "E:\Users" /AD /B') do call :parse %%a
endlocal
GOTO :EOF
:parse
echo %*
ICACLS "E:\Users\%*" /reset /T
ICACLS "E:\Users\%*" /grant:r "domain.local\%*":(OI)(CI)F
ICACLS "E:\Users\%*" /setowner "domain.local\%*" /T
:end
----------------------------------------------------------------------------------------------
No comments:
Post a Comment