@ECHO OFF
SETLOCAL enabledelayedexpansion
CD /D "D:\Public\Users\"
FOR /D %%A IN (*) DO (
IF %%A NEQ "default" THEN (
REM TAKEOWN /F "%%A" /A /R /D Y
REM ICACLS "%%A" /RESET /T
REM ICACLS "%%A" /GRANT:R "DOMAIN\%%A:(OI)(CI)F"
REM ICACLS "%%A" /SETOWNER "DOMAIN\%%A" /T
ECHO %%A >> C:\Public\Scripts\Log.txt
)
)
ENDLOCAL
EXIT
Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Expert of the Year award recognizes an expert who helped improve Experts Exchange in the past year through high levels of contributions and participation on site. This award is given to the expert who has achieved the highest levels of participation, while maintaining quality contributions and professionalism.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.