http://vernanderson.wordpress.com/2012/03/29/toggle-folder-inheritance/
I made this a while back maybe it will be useful. But in my findings the PowerShell way of setting folder and file permissions is not very great. I have other scripts that just use PowerShell to do the recursion and pipe the information to icacls.exe to change the permissions.
But to reset inheritance PowerShell does the job pretty good.
-VERN