RSS

PS: Using Set-ACL to permission LIST-ONLY security rights in folders

29 Aug

We have a requirement that includes a group with list-only security permisions to data folders. As far as I remember, this was a requirement for auditing purpose. Anyhow, I could never find out how to do this using xcacls.exe, but with powershell you can.

$acl = Get-Acl c:\temp\test

$arguments = “domain\groupname”,”ReadAndExecute”, “ContainerInherit”, “None”, “Allow”

$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $arguments

$acl.SetAccessRule($accessRule)

$acl | Set-Acl c:\temp\test

Advertisements
 
Leave a comment

Posted by on August 29, 2010 in powershell, Scripts

 

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: