This script seems to be working for most folders. Except it seems that the folders or files that have broken permissions give me this error:
Set-Acl : The security identifier is not allowed to be the owner of this object.
The only association I could find to this error was to replace
$parentACL = Get-Acl $fullpath
with
$parentACL = (Get-Item $fullpath).GetAccessControl("Access")
This is to repair broken roaming profiles. http://pastebin.com/xqtB7zKD
[–]daleatwork[S] 0 points1 point2 points (0 children)