I've wrriten the below code to modify a users' HomeDirectory in ActiveDirectory by reading a drive mapping from their logon script. It works, but the problem is that every value is added and not just the one from each particular users' logon script. e.g. "\\server1\user1" should be added but "\\server\user1 \\server\user2 \\server\user3" is actually added.
I'm thinking I need to create a hash table to get it to work but I'm not having much joy. Hopefully someone can help me out 🙂