I recently had an issue where an iSCSI volume, formatted in NTFS spat its permissions. We all know the built-in UI for applying permissions is garbage, and as such I used this powershell script to grab each folder, and create a new process per folder, which then recursively applied new permissions.
The reason why jobs are used is because each job will run as a separate process, which means the time to complete the permissions change will be far faster than doing it with a single process, as icacls is slow.
You can adjust the script to your taste, but for me, I had a heap of folders with 66000 PNG frames from an AI Upscaling project that needed permissions applied to.
$folders = Get-ChildItem "L:\AI Upscaling"
$folders | ForEach-Object -Process {
$job = {param($loc) invoke-expression -command:"icacls '$loc' /t /grant Everyone:'(OI)(CI)F'"}
Start-Job $job -arg $_.FullName
}
For your use, I recommend modifying the Get-ChildItem to a relevant directory, and to change who the icacls command is applying permissions for.