PowerShell: Add Windows NTFS Permissions to File or Folder
The re-usable function: $path='C:\Windows\servicing' $accountsToAdd='Administrators' $permissions='Full' function addNtfsPermissions ($path,$accountsToAdd,$permissions){ $acl = Get-ACL $path $accessRule=New-Object System.Security.AccessControl.FileSystemAccessRule($accountsToAdd,$permissions,"Allow")…
0 Comments