I really require some help on this script I’ve been working on. We currently use GPO for folder/file redirection and its giving me issues when I run this script.
We are in the process of standardizing our User login names to first letter + lastname. However, when I run this script and the user logs in, they are unable to create new folders on their desktop. They receive “No Object for Moniker error”. I’m not sure what piece of the puzzle I’m missing here and could really use some help(Note, our folder/files are on a File Server on the network). I thought it would be as easy and just renaming the folder in the file server using the Rename-Item cmdlet and than just setting the home directory to the new file path with the new name…not so. The directory is showing up as their H: drive, but they are not able to create folder/files directly on their desktops, receiving that moniker error.
Mind you, this only happens if the user logs on to the SAME PC with their new credentials. Their H: drive is there but they are unable to create folders/files on the desktop. HOWEVER, if they log on to a DIFFERENT PC, than all their old folders are there and they have no problems creating files/folders.
I think this may have to do with the registry on the local PC holding on to those old credentials but I am not sure…
Please see link to my code:
Link to code: http://pastebin.com/LEahZ5AQ
Thank you all for our help!