i need to alter the ownerships and permissions of home folders of about 800 staff members and currently exploring xcacls.vbs to do this.
the current owner of each user’s home folder is ‘administrator’, i need to change the owner of each folder to the respective user i.e john smith should be the owner of \\server\staff\sjohn and jane doe should be the owner of \\server\staff\djane
using xcacls.vbs, i have this so far:
xcacls.vbs \\server\staff\%username% /o %userdomain%\%username%
my question is, without having to apply this individually for each user/folder, is there a way where i can return all the usernames in the staff folder and apply that to xcacls?
any help appreciated! =0)