It is very simple…
$path = 'C:\Temp' New-Item -Path $path -ItemType directory $acl = Get-Acl -Path $path $permission = 'Everyone', 'FullControl', 'ContainerInherit, ObjectInherit', 'None', 'Allow' $rule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $permission $acl.SetAccessRule($rule) $acl | Set-Acl -Path $path
One response to “PowerShell Tip – How to set permissions that applies to folder, subfolder and files without iCacls?”
Thank you