Forum Discussion
craigbowens
Feb 17, 2022Copper Contributor
Script to change permissions on multiple folders
I am involved in a project to migrate users H: drive data to OneDrive. After we migrate their data to OneDrive, we want to change their H: drive folder and files to read-only. I have found a cacls ...
- Feb 18, 2022
craigbowens You could try something like using c:\temp\users.txt as input with a username per line. Not tested this, but I think it should work...
foreach ($user in get-content c:\temp\users.txt) { cacls.exe "k:\$($user)" /T /E /C /P "$($user):R" }
Feb 18, 2022
craigbowens You could try something like using c:\temp\users.txt as input with a username per line. Not tested this, but I think it should work...
foreach ($user in get-content c:\temp\users.txt) {
cacls.exe "k:\$($user)" /T /E /C /P "$($user):R"
}