$acl =
Get-Acl c:\temp
$permission =
"domain\user","FullControl","Allow"
$accessRule = New-Object
System.Security.AccessControl.FileSystemAccessRule
$permission
$acl.SetAccessRule($accessRule)
$acl | Set-Acl
c:\temp
This one is shorter...
Works for me.
So, does "domain\user" exist in your environment? That syntax supposes
that you are adding a *domain* account with that username.
Marco
--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp
PowerGadgets MVP
http://www.powergadgets.com/mvp