Problem: The way we were mapping people to their Home drives (h drives) was through active directory (the 'Profile-Home Folder-Local path' option). When we migrated to a new server, we needed to change the server to the new server in ADUC
A little while after that, we decided to start mapping
people to their home drive via VBscript rather than through ADUC. In order to be successful, we needed to clear the local path string in ADUC and assign the script via GPO to each users logon script. Problem was no one wanted to waste 10 hours getting carpal tunnel.
removing these values manually. To further complicate the problem, our VBScript mapped the home folder using the %username%, some of which were changed since the folder was created. This meant that for those select users, the script would not work.
Solution: We created a script that would change the 'local path' value to the new server. Later, we created one that would clear out all the 'local path' values of a defined OU. To rename the folder to the current username, we created another script that would scan each folder, look at the usernames that have permissions,
ignore usernames that it was defined to ignore, then if it found a username that it was not told to ignore and found that it did not match the folder name, it would prompt the admin to change the folder name to the current user name. Wicked, ain't it?
Attached file has all necessary scripts to do what was just described.