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?
schmad01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sekar ChinnakannuStaff EngineerCommented:
Create a OU for three different site and set the policy, Goto GPO -> User Configuration > Windows Settings -> Folder Redirection\My Documents -> Right-click My Documents -> click properties -> Target tab -> click Basic -> Redirect everyone's folder to the same location -> Under Target folder location select the option\configure as per your need.

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
0
schmad01Author Commented:
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.
0
FlippCommented:
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.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Steven WellsSystems AdministratorCommented:
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.
0
schmad01Author Commented:
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?
0
Steven WellsSystems AdministratorCommented:
In Group Policy Management console, down near the bottom you have Sites.
0
schmad01Author Commented:
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?
0
Steven WellsSystems AdministratorCommented:
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.
0
schmad01Author Commented:
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.
0
Steven WellsSystems AdministratorCommented:
Give me a bit and I can send you something
0
schmad01Author Commented:
Thank you.
0
Steven WellsSystems AdministratorCommented:
HI,
Please have a look at the attached file. Rename to .vbs

Adjust to your requirements.
MapDrivesbysites.txt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
schmad01Author Commented:
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?
0
Steven WellsSystems AdministratorCommented:
Hi. Replace as you see fit to adjust to your needs.  😊
0
schmad01Author Commented:
Ok, I'll get back to you tomorrow.
0
FlippCommented:
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.
0
schmad01Author Commented:
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\%username%

I heard that the variable %username% does not work in Group Policy. I then tried %logonuser%

That didn't work either.
0
schmad01Author Commented:
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?
0
Steven WellsSystems AdministratorCommented:
You can just comment those lines out or run the script using cscript
0
FlippCommented:
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.
0
schmad01Author Commented:
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.
0
Steven WellsSystems AdministratorCommented:
You could try and change the line to say if name in string rather than a direct match.

Ie if instr("xyz") then
0
schmad01Author Commented:
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.
0
schmad01Author Commented:
Nevermind, I got it.
0
schmad01Author Commented:
That solution worked great! Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.