David Schmalzer
asked on
Folder Redirection based on site
I have 3 sites linked by vpn with their own subnets and their own domain controllers. My question is two-fold. I would like to re-direct all user's documents to their home drive but based on site. I have replication and namespace enabled so all user's folders are replicated to each server.
First, how can I set up folder re-direction in group policy to re-direct user's documents to their site-specific server?
and
Once this is successfully implemented, will it automatically move the user's existing documents from their local folder to the server share?
First, how can I set up folder re-direction in group policy to re-direct user's documents to their site-specific server?
and
Once this is successfully implemented, will it automatically move the user's existing documents from their local folder to the server share?
ASKER
Are you suggesting that I put users in the newly created OU? That may not work as users may move from site to site and I do not want to use roaming profiles either.
Can you map drive based on % LOGONSERVER%? I was looking at doing something similar in a few months an wo dered whether this would work.
You can also apply GPO objects to the Site level. That way it will query the Site to apply your Folder Redirection Policy.
Then you can leave your staff in the same OU.
Then you can leave your staff in the same OU.
ASKER
I like both Flipp's and Steven's suggestions. Not sure how to apply GPO objects to the site level. Can you give me some insight on that?
In Group Policy Management console, down near the bottom you have Sites.
ASKER
I think I want to map drives. I would like to do this based on the user's computer name. How can this be done?
You can write a VB script that checks the name of the computer. There are plenty of examples on the net how to do this.
ASKER
I tried the gpo policy route but was not successful. I want to move on to vbscript. I tried searching on web but can find nothing useful. I want to map a drive to a user's home folder on a specific server based on the user's computer name.
Give me a bit and I can send you something
ASKER
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Wow, thanks,
That looks good, let me have some time to go through it and adjust names and test. Is the Home$ a hidden share? I already have a non-hidden share called "users" in which all user folders are. I assume I can replace the Home$ with users?
That looks good, let me have some time to go through it and adjust names and test. Is the Home$ a hidden share? I already have a non-hidden share called "users" in which all user folders are. I assume I can replace the Home$ with users?
Hi. Replace as you see fit to adjust to your needs. 😊
ASKER
Ok, I'll get back to you tomorrow.
I am curious why you had issues with GPP to map a network drive? I use it religiously with zero issues. Might be worth getting it working for greater flexibility.
ASKER
Flipp, I created a GPO policy and linked it to the site I was testing, set up the mapped drive, performed a gpupdate /force
and tested. It did not work. My target was \\jmvfc-server-1\users\%us ername%
I heard that the variable %username% does not work in Group Policy. I then tried %logonuser%
That didn't work either.
and tested. It did not work. My target was \\jmvfc-server-1\users\%us
I heard that the variable %username% does not work in Group Policy. I then tried %logonuser%
That didn't work either.
ASKER
Steven Wells,
You script worked great. I like the information pop-ups but don't want the user to have to click OK to move on. What do I need to change for this?
You script worked great. I like the information pop-ups but don't want the user to have to click OK to move on. What do I need to change for this?
You can just comment those lines out or run the script using cscript
I can't get onto my Servers to check, but you could refer to http://www.alexcomputerbubble.com/using-group-policy-preferences-gpp-to-map-user-home-drive/ which talks about it.
ASKER
Steven Wells,
One more question, For the arrays, instead of listing all computer names, can I just use a partial computer name? For example at site 1, all the computer names are named like jmvfc-1-1, jmvfc-1-2, etc. What if I just wanted to use jmvfc-1?
It would be tedious to keep changing computer names as new pc's are added.
One more question, For the arrays, instead of listing all computer names, can I just use a partial computer name? For example at site 1, all the computer names are named like jmvfc-1-1, jmvfc-1-2, etc. What if I just wanted to use jmvfc-1?
It would be tedious to keep changing computer names as new pc's are added.
You could try and change the line to say if name in string rather than a direct match.
Ie if instr("xyz") then
Ie if instr("xyz") then
ASKER
Ok, that works. One thing I noticed though, that if the drive is already mapped, the script displays an error. I need it to either resume on error or remove mapped drives in the beginning before mapping.
ASKER
Nevermind, I got it.
ASKER
That solution worked great! Thank you.
If you need more details you can review the MS recommendations too http://msdn.microsoft.com/en-us/library/cc785925(v=ws.10).aspx
screen.JPG