0 votes


I need a script that will retrospectively create a sub-folder on file server's shared folder with following permissions:

  • employee
  • his/hers manager (taken from AD)
  • specific security group(s)
  • usual SYSTEM and local server Administrators security group as well, so that we have access for backups etc purposes. We can set a inheritable permissions for them (system etc) on top share level, but would be interested in confirming that internally in script as well.

There will be a shared folder with access-based enumeration enabledavailable to create them in. We'll get circa 200+ usernames we'll need to create and permission individual folder for, but then we will also need to incorporate similar script into normal AD user creation for future users and possibly for more pre-existing users that don't have them.

Thanks for any feedback.

by (650 points)

1 Answer

0 votes
by (4k points)


In Adaxes there is no built-in functionality to manage shared folder permissions. However, it can be done using PowerShell scripts. If you need to create a shared folder and set it as users home directory, you can use the Create a home directory action. The required folder permissions can be granted using a PowerShell script. For example, the below script from our repository can be modified to meet your needs: https://www.adaxes.com/script-repository/grant-access-to-user-s-home-folder-s15.htm. To create folders for existing users you can use a Scheduled Task configured for the User object type. To create folders for new users a Business Rule triggering After creating a user can be used. Should you have any issues modifying the script to meet your needs, we will help you.



It would be additional completely independent from profile and/or 'redirected folders' subfolder created on separate file server. Will look into modifying this script, but actual actions are 'pretty simple' :

  • get a %username% from a csv file
  • look up %manager% for that username
  • create folder called %username% inside 'specified share path'
  • set NTFS permision to 'Modify' for username, manager, 'specified security group' and 'Full Access for Domain Admins and local Administrators,

Furthermore I will amend script to be an action in 'After creating a user' task and as an selectable action for existing individual user.

Related questions

0 votes
1 answer

We have our user folders set up in an "odd" way - everyone's main user drive is open to everyone, with the exception of a Private subfolder. Right now I'm using a ... .Run(WRITER, 0, TRUE) Set Writer = nothing Set FILESYS = nothing Set WSHShell = nothing

asked Jun 12, 2013 by danftasc (3.4k points)
0 votes
1 answer

How would a script be written that accomplishes the following task? In this scenario, UserA would be selected with the Modify user action, then UserB would be input to ... rule that runs the script to allow reviewer permissions on UserA's calendar for UserB

asked Dec 6, 2012 by mdeflice (2.7k points)
0 votes
1 answer

I need a list of all the URLs that Adaxes creates in IIS on the server Adaxes is installed on.

asked Feb 6 by DaralenManta (250 points)
0 votes
1 answer

I am having an issue with home folder moves between servers. When I move a folder between servers, using Adaxes, the user permissions are lost. I know that this is expected ... to re-assign the user permissions so they can access their home folder again :?:

asked Sep 23, 2014 by rmedeiros (1.8k points)
0 votes
1 answer

Is there a good way to use Adaxes to review effective rights to directories and files? I was thinking maybe a custom command posted on a web interface. I am not sure if the directories could be prompted or if it would be one command per location.

asked Jun 20, 2017 by adaxes_user (2.1k points)
2,352 questions
2,107 answers
131,022 users