Please check Get Access Control Entry (ACE) of directory objects in Powershell post for background information. Please be warned without taking any further action; the script provided in this post is still under construction; to be honest this is true for every other script you can find on this blog but there is an extra warning here as this will alter the security permissions; damage can be done more easily. I need to do more testing and develop some poor areas which I know they exists but couldnt find time yet to correct them
a picture worth a thousand words :)
Reference #1: https://www.microsoft.com/technet/scriptcenter/resources/pstips/may08/pstip0516.mspx
Cheers, CanD