Multiple times during the day we need to create a series of nested folders. Each of those folders needs to have different ACLs assigned to them. I wrote a script to help streamline the process but I'd like to allow a non-Admin user to run this script only. I keep getting the error: Attempted to perform an unauthorized operation.
I tried a variety of permissions and made sure they apply to This folder, subfolder and files. Some combinations I tried were giving Write access (didn't work) and giving Advanced Permissions: Traverse folder / execute file, Create files /write data, Create folders / append data, Write attributes, write extended attributes, Change permissions.
My initial thought was this type of role would only need Change Permissions, Write attributes, execute file and Create folders.
The script is also unsigned so that's another layer of administration that hinders this idea.
Is there a way to set the script and ACL up to have the necessary access rights to allow a user to do just this task?
• You can try the following command to run in powershell as a normal user. This will run the encoded actual command in the script in powershell: -
• Or else, you can try the following script in powershell which calls the original script through a variable in powershell: -
This will help you run the script from the directory location where it is placed with non-admin rights.
Please find the below link for more information: -
How do I run powershell scripts without admin rights?