My new employer has folder redirection setup for its hundreds of users, and the person who set it up didn't really know what he was doing. As a result, the best practices for permissions on redirected folders/home directories was not followed.
The solution to let people access their redirected folder locations was to instead apply
Full Control permissions (NTFS permissions, not "share" permissions, of course) to
Everyone at the root directory ("Home") and propagate that down to all subfolders and files below the root.
What could possibly go wrong, right? It's not like the CEO has confidential information in his
My Documents folder, or anyone's going to get infected with CryptoWall and encrypt everyone else's files. Right?
So, anyway, now that the CryptoWall infection has been removed and backups have been restored, a number of people would like us to replace the current permissions with something less horrible, and I would like to not have to click around the permissions dialogues in several hundred folders.
How can PowerShell solve this problem for me, and make life worth living again?