Solved

Creating a folder in a network location using GPO - Group Policy

Posted on 2013-12-04
9
537 Views
Last Modified: 2013-12-05
I am trying to create a folder on a mapped drive that all the users have. For example the drive is H:\ and the folder existing is "folder1". I want to create a folder in "folder1" for everyone so that it will read H:\folder1\folder2. Anyone know if this is possible by using group policy?
0
Comment
Question by:Wayside_Tech
  • 4
  • 4
9 Comments
 
LVL 7

Expert Comment

by:George Simos
ID: 39696740
So you have shared a folder on a server which is named as folder1 right?
Let's say your server's name is "FileServer1" and the physical path of the shared folder named "Folder1" is D:\Folder1.
Have you shared folder1 and given the right permissions (sharing and ntfs ones) to the users you want?
After that have you created another folder named "Folder2" under "Folder1"?
If you have done the above steps then from a windows explorer you can type:
\\FileServer1\Folder1\Folder2
and you will have access to the folder.
If you want now to map the path \\FileServer1\Folder1\ to H:\ you can do this either via a logon script by using the command
"net use H:\ \\FileServer1\Folder1\"

Open in new window

and putting the script file on your netlogon folder of your domain (eg \\mydomain.local\netlogon\mapdrives.cmd) and put this path in the GPO.
Alternatively if you have Windows 7 you can use Group Policy Preferences to map the drive letter to your share.
Group Policy preferences can work in Windows XP too but you have to download the following update (http://www.microsoft.com/en-us/download/details.aspx?id=3628) but you have to manage the GPOs via a Windows Vista and later machine with the Group Policy Management Console installed via the Remote Server Administration Tools package.

What I don't understand it that you say "I want to create a folder in "folder1"" via GPO, you actually don't have to do that via GPO, you do it as described above!
0
 
LVL 14

Expert Comment

by:dmwynne
ID: 39696742
You can try using group policy preferences, configure a folder item:

http://technet.microsoft.com/en-us/library/cc730913.aspx

I can't test this at the moment to tell you it will work definitively.
0
 
LVL 1

Author Comment

by:Wayside_Tech
ID: 39696874
Gsimos,

I thank you for your quick response. The mapped drives have already been setup. Every user that log's in has this drive being mapped. It's a folder for each user mapped according to their usernames. Each user has their own folder that is named their username.
The issue is rather than me going to everyone's computer and create this folder within the mapped drive; I wanted to create this folder using Group Policy.
The reason I want to create the folder is because I want to redirect a file to the folder . I was looking for a way to automate the creation of the folder in GPO then use another group policy to redirect a file location. But, my issue is I can't get the folder to be created in the mapped drive when I test it. Which means I can't get the file to relocate to the network location (mapped drive).
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 7

Expert Comment

by:George Simos
ID: 39696925
Let me get this straight, your final target is to redirect users folders such as "Documents", "Videos", "Desktop" etc?
0
 
LVL 1

Author Comment

by:Wayside_Tech
ID: 39696948
Yes, I am trying to redirect the user's "Templates" folder.
0
 
LVL 7

Expert Comment

by:George Simos
ID: 39696950
This is a custom folder you have created I presume right?
0
 
LVL 1

Author Comment

by:Wayside_Tech
ID: 39696966
No, usually the folder is found at C:\Users\"username"\AppData\Roaming\Microsoft\Templates

I am just trying to have the templates go to the mapped drive instead of locally on the hard drive.
0
 
LVL 7

Accepted Solution

by:
George Simos earned 500 total points
ID: 39697039
Well you don't have to burden yourself a lot with that, especially you don't have to map it on any drive letter, the solution for you is the enabling of roaming user profiles, by doing that the %AppData%\Roaming folders of the users are moved to the network location you designate and a local cached copy is kept and synchronised during logon/logoff (you may set up policies through GPOs to sync periodically also while logged in).

You can achieve that by creating a GPO and link it on the OU with the Users you want to have such profiles.
Then edit the GPO and go to the Section: User Configuration > Policies > Folder Redirection
Right Click on "AppData(Roaming) and click properties
At the Setting dropdown select "Basic - Redirect everyones folder to the same location
At "Target folder location" select "Create a folder for each user under the root path"
In the "Root Path" box type the UNC path for the server share you have created, let's say \\FileServer1\Folder1\
Now click on "Settings" tab and check that the boxes "Grant the user exclusive rights to AppData(Roaming)." and "Move the contents of AppData(Roaming) to the new location" are checked
The final step is to decide the Policy removal which by default does not redirects back the folder when the policy is removed or is out of scope, this is something you will decide better
Finally press Apply and OK and close the GP Editor.
Now what we have achieved? Every user's Appdata(Roaming) profile folder will be redirected to the shared folder above, users don't need to have direct access there because they have a cached copy on their PC(s) but they can go and work on any pc in the premises and have their roaming profile following them!
You must keep in mind that this needs a double logon/logoff to work.

I hope this helps you.
0
 
LVL 1

Author Closing Comment

by:Wayside_Tech
ID: 39698429
Very quick and consistent in answering us back! Thanks for the great suggestions and solutions.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question