Seems very simple, but I had to puzzle a little to get it working,
here’s a small function I came up with, maybe it will save you some time,
it will Add permissions, not replace the ACL.
Function GrantFullControl ($File)
$acl = $file.GetAccessControl()
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule (“Administrators”,”FullControl”,”Allow”)
So you can call it like this:
$MyFile = Get-ChildItem “Myfile.txt”