This Windows PowerShell script will modify the file permission, and fix fix issues described in KB947222.
When user redirect the Documents folders to network share, the folders name changes back to My Documents as shown in the following figure. This issue can be fixed by denying Read permission to the administrator for the Desktop.ini files on the server. But the customers need to perform steps one by one. It would be great if we have a script to automate this task.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery