Assign group permissions on folders using Powershell via CSV

Hello!

we are working on a new Permission Concept.
We created different Security Groups,depending on the Department.

For example:

Finance_List, Finance_Read, Finance_ReadWrite

Controlling_List, Controlling_Read, Controlling_ReadWrite

Planning_List, Planning_Read, Planning_ReadWrite

Now i am searching for a script to automate the process for setting GroupPermissions on specific Folders.

Example:
Folder Finance:

Disable Inheritance and then set new permissions and replace them to all files and subfolders:
Group Finance_List (List Folder), Group Finance_Read (Read), Group Finance_ReadWrite (Modify)

CSV Example (Folderpath and the 3 GroupPermissions per Folder):

\cifs\Finance;Finance_List;Finance_Read;Finance_ReadWrite

I have 300 securitygroups and 100 folders.

Any help would be much appreciated.

Thank You!

Hi Phil9431,

You can use the Import-Csv cmdlet to import you csv file as an object. Then, I would suggest taking a look at the NTFSSecurity module that is on the PSGallery. The module contains useful functions that can automate what you are looking to do.

Find-Module NTFSSecurity
Install-Module NTFSSecurity

That would be a good place to start to create your script.

pwshliquori

Hey!

Thanks for your Response!

I will try and let you know if it worked!