jimmy_2k Posted October 19, 2021 Posted October 19, 2021 Hi all I've been trying to grant full access to our students home folders by using an icacls script I found on the internet below. This script creates the text file with the folder names which match the usernames, but the final step doesn't take place and the script won't add the users to their respective folders. I wondered if this was due Server 2019 preventing it? @echo off REM Create list of folders dir /a:d /b E:\HomeFolders\B20 >C:\temp\usersB20.txt REM Read each line from just created text file... for /f "tokens=*" %%G in (C:\temp\usersB20.txt) do ( REM ...and set ownership for each folder icacls "E:\HomeFolders\B20\%%G" /setowner "yggg.internal\%%G" echo. )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now