-1

I have a large list of folders within a single folder directory. My network rules are set where ntfs permissions are not inherited. I need to assign read and write permissions to each individual folder for the same 4 users to each of these individual folders is there a script for this?

Thanks for your assistance!

1 Answers1

0

All you need is to get to your goal is here:

# Get parameters, examples, full and Online help for a cmdlet or function

(Get-Command -Name Get-Acl).Parameters
Get-help -Name Get-Acl -Examples
Get-help -Name Get-Acl -Full
Get-help -Name Get-Acl -Online

(Get-Command -Name Set-Acl).Parameters
Get-help -Name Set-Acl -Examples
Get-help -Name Set-Acl -Full
Get-help -Name Set-Acl -Online

(Get-Command -Name Get-NTFSAccess).Parameters
Get-help -Name Get-NTFSAccess -Examples
Get-help -Name Get-NTFSAccess -Full
Get-help -Name Get-NTFSAccess -Online

(Get-Command -Name Add-NTFSAccess).Parameters
Get-help -Name Add-NTFSAccess -Examples
Get-help -Name Add-NTFSAccess -Full
Get-help -Name Add-NTFSAccess -Online

PowerShell – Editing permissions on a file or folder

I've been trying to figure out how to change permissions on a folder in PowerShell. I've looked at the Get-Acl and Set-Acl, but I can only use them to copy the settings from a pre-existing object. How do I manually configure permissions?

This is actually a quite common question, so I thought I'd write a quick post on the subject.

https://blogs.msdn.microsoft.com/johan/2008/10/01/powershell-editing-permissions-on-a-file-or-folder

Weekend Scripter: Use PowerShell to Get, Add, and Remove NTFS Permissions

Managing file and folder permissions in Windows PowerShell is not that easy, and there are numerous articles and blog posts describing how it works by using the .NET classes. This is far from being comfortable, and there is one major and one minor restriction: • Path length • Generic rights

This post introduces the NTFSSecurity module, which provides a bunch of cmdlets for managing permissions on NTFS drives. It does not use the Windows PowerShell way to access the file system, and it works around the MAX_PATH, which is 260 characters. (For more information, see Naming Files, Paths, and Namespaces). This is achieved thanks to AlphaFS.

https://blogs.technet.microsoft.com/heyscriptingguy/2014/11/22/weekend-scripter-use-powershell-to-get-add-and-remove-ntfs-permissions

postanote
  • 15,138
  • 2
  • 14
  • 25