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.

 

)

Posted

How are you doing your homefolders, is it via the Profile tab in the users AD account object.

 

This will not work if you are using hidden shares but on a test user simply update the home folder to \\Server\HomeFolderShare\%Username%

 

Not tried this under 2019 however and it depends on the existing permissions on the shared folder. The last time I did this was with 2012 R2 over 7 years back.

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...