This script Pauses in between giving you permissions and setting the correct permissions.
This way if you want to manage what is in the users redirected folders you can.

Takes ownership of redirected folder and assigns the correct permissions back to files and folders recursively.
If you want it can also delete the folder if it's not in use.
When it checks AD for the user if the user is not there it will delete the folder.