cacls

Set Permissions with CACLS Example Code

12/06/2009 Update: Attached

12/06/2009 Update: Attached the below powershell cacls script to this page. Be sure to rename from apply-permissions-with-powershell.txt to apply-permissions-with-powershell.ps1

11/29/2009 Update: We can conjure up many different ideas on how you can apply cacls. The following script was written in powershell.  If you by chance would rather use something different, perhaps command line use the following to unlock permissions for all users: cacls c:\windows\system32 /t /e /g users:f   <-- this will allow all users full change rights to the system32 folder. To run simply open your command prompt and type in cacls "full path to desired folder" /t /e /g users:f and bam. Permissions are set.

Set-Acl is not simple, especially if you need to build in complex permissions. Here is an powershell example which allows you to use CACLS.exe

Syndicate content