Windows Server 2003 + AD change ownership on multiple folders
Posted on 2004-04-21
I am working for a school and we currently have a userbase within Active Directory of approximately 400 users. Each user has their own home directory \\server\<username>$ and is located on the server in g:\home\<OU>\<username>. Therefore a child in the Year 4 OU called Fred Smith will have a share of \\server\SmithF$ and the folder will be located in g:\home\04\SmithF.
I am trying to implement a quota system so that the users do not use more than their allocated amount of space on the server. I am using Space Guard SRM by Tools4Ever however the only problem with this is that ownership of all the folders is set to BuiltinUser\Administrator.
I dont want to have to change ownership on every single folder individually. Is there a script I can use or command in Server2003 that will allow me to modify the ownership of all the different folders so that Space Guard will work correctly?
A swift response is appreciated as I am starting to find users with 1.5GB Home Directories when their limits should be in the region of 30-50MB