Access Control List в PowerShell

The Get-Acl cmdlet gets objects that represent the security descriptor of a file or resource. The security descriptor contains the access control lists (ACLs) of the resource. The ACL specifies the permissions that users and user groups have to access the resource.

The Set-Acl cmdlet changes the security descriptor of a specified item, such as a file or a registry key, to match the values in a security descriptor that you supply.

Посмотрим разрешения папки C:\test1\

PS C:\Users\Administrator> Get-Acl C:\test1\ | Format-List

Cкопируем разрешения одной папки на другую и посмотрим что получится:

PS C:\Users\Administrator> Get-Acl C:\test1\ | Set-Acl C:\test2\

PS C:\Users\Administrator> Get-Acl C:\test2\ | Format-List

You May Also Like