Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Set-ACL on a file

$
0
0

Hi Guys,

I have a file in a deployment I'm working on currently that I need authenticated users to have access to.  I haven't touched on ACL much in the past besides a few files in MDT that I used cacls.exe for, but I'm looking to add some configs to my powershell deployment script.  The code I'm using is -

$acl = get-acl C:\programdata\sun\java\deployment\security\trusted.certs
$acl.SetAccessRuleProtection($true, $false)
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule("Users","FullControl","Allow")
$acl.AddAccessRule($rule)

I run that and nothing looks to be changed on the file.  This is my first time using this, so I could have something off :)  Any help would be appreciated.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>