For the migration of a file server, I had to reset the NTFS permissions. Since manual permissions setting was me to clumsy, I wanted to do it using PowerShell.
Setting permissions isn’t so easy as i thought and isn’t immediately clear to understand.
Here’s a script I used to set the necessary permissions, which also includes some explanations.
https://github.com/tsukaito-code/Powershell/blob/main/Fileserver/Set-NTFS_Permissions.ps1