Create setPermissions.bat and paste code below
Change DOMAIN to your domain name.
D:
cd D:\Users\
for /D %%i in (*) do (
icacls %%i /inheritance:r
cacls "%%i" /T /E /G "CREATOR OWNER":F
cacls "%%i" /T /E /G "SYSTEM":F
cacls "%%i" /T /E /G "DOMAIN\Domain Admins":F
cacls "%%i" /T /E /G "DOMAIN\%%i":C
)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article