jsmock Posted July 26, 2011 Posted July 26, 2011 Is there a way to automatically configure folder share permissions based on the name of a folder? Say for example a user creates a folder (anywhere on the server) named "Quotes". I would like that folder to automatically belong to the Quoting Group and exclude access by anyone not in the Quoting Group, even if the user that created the folder is not a member of the Quoting group. We have a database application that creates and manages a large number of folders. It creates thousands of numbered folder "sets", each numbered folder having a standard set of sub-folders like Sales, Purchase Orders, etc. We need to control access to the sub-folders based on Group membership. Any user of the database might trigger the creation of a new set of folders. The database application must be able to create a complete set of folders regardless of which user is logged on and then (hopefully) apply security to the new folders based on folder name. I suppose I could do this through a Windows PowerShell script, perhaps run every evening (which would be acceptable) but is there a better (easier) way through Group Policy or some other method? thanks Quote
ICTCity Posted July 26, 2011 Posted July 26, 2011 Hi, No, you can only use Power Shell or VBS to accomplish this task. You can retrieve the group of the user, and then use it to set permissions. Quote -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------
jsmock Posted July 26, 2011 Author Posted July 26, 2011 Thanks for the quick reply. I'm an experienced programmer but just learning Windows PowerShell. Can you by chance point me to any examples of how to loop through all the folders on a server? greatly appreciated. Quote
ICTCity Posted July 26, 2011 Posted July 26, 2011 Using the built in commands... you can do something like this: $dirs = get-ChildItem -Recurse | where {$_.psIsContainer -eq $true} $dirs | select fullname Quote -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.