Jump to content

Recommended Posts

Posted

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.

 

)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...