Honestly, there’s some times when…Ok, ALOT of times when you feel like cold water has been thrown over the burden on your shoulders and within a few minutes of googling, someone you’ve never met will save your life. This is one of those 😉
Hundreds of home drives under DFS…And everyone has access to everyone’s drives (thankfully said drives are empty). Then as you create more, you realise that even new ones are doing the same thing. Thankfully, this wonderful person already wrote a powershell script to fix it!
You can see from the comments a slight change needs to be made and if I remember rightly, I think you need to use powershell 2 (or a less modern version anyway)
Fix NTFS home drive permissions script
If you’re using DFS or folder redirection with home drives the following MS KB also helps!
How to dynamically create security-enhanced redirected folders or home folders