Fixing the My Documents folder problem has often been a pain as we have this problem over and over during migration when you find that a user has been setup in such a way that their My Docs path is essentially pointing to the root folder of their folder on the server; for example an invalid path would be –
D:\Users\Student\Intake 2019\JBloggs\my powerpoint.pptx
Where as we want/need all users to be setup as below –
D:\Users\Student\Intake 2019\JBloggs\Documents\my powerpoint.pptx
This is due to the great way in which Windows 10 renames Documents folders to My Documents making it impossible (not actually impossible) to see who the folder belongs to.
In order to resolve the issue I use the script below which checks for the presence of a Documents folder and if one doesn’t exist creates one and moved the docs over.
Simply run the script from a PowerShell Admin console and point it to the root of your users directory; for example D:\Users\Student\Intake 2019 it will then recourse through each subfolder and rename as required.
We also often find that the user Documents are is named My Documents which for GPO Folder redirection isn’t correct as the system will look for Documents to we often have to run the below to rename My Documents to Documents en mass for all users.