====== NTFS ====== | Take ownership of directory structure (elevated) | ''takeown /r /f *'' | | Reset all file permissions on an NTFS Volume | ''icacls * /t /q /c /reset'' | ===== Batch apply permissions to home folders ===== @echo off cd X:\ X: for /f "usebackq delims=|" %%h in (`dir /b`) do ( icacls %%h /inheritance:r icacls %%h /remove:g "DOMAIN\admin.wolf" icacls %%h /remove:g "DOMAIN\Domain Users" icacls %%h /remove:g "THISPC\Users" icacls %%h /remove:g "Users" icacls %%h /grant:r "DOMAIN\%%h":^(OI^)^(CI^)M) ===== Links ===== * [[https://ss64.com/nt/icacls.html|ICACLS Manual]]