How does one remove individual users from folder permissions and add them to RO RWM FULL groups instead, rather than opening files and folders and removing and adding one by one for thousands of users?
It will mess up the current access group if the folder path is a on a remote server such as \\server2022\folder after running the script. The folder will then have the group created by script only. Once you remove this group, the default access group will be back again. Do you have any idea why this happen? Thank you in advance.
Is it possible to check the permissions of a User for the folder? First, I have to validate the user's existing permission for the specified folder, if permissions are there which I expect then I don't need to add the user to any groups which have required permissions.
Such things are always possible. You would do some thing like get the user id and any groups they are member of and check that against existing assignments
@@TipsForITPros the user needs read ,write and modify permission, then there is a group present having these 3 permission ,then what should be the script . $groups = $acl.access.where({$_.filesystemrights -match "Read" -AND $_.filesystemrights -match "write" -AND $_.filesystemrights -match "modify" -AND $_.IdentityReference -notmatch "BUILTIN" -AND $_.IdentityReference -notmatch "$env:COMPUTERNAME" }) is it ? is the above written script correct ?