<

Using Group Policy Preferences for copying files

Published on
36,056 Points
29,556 Views
5 Endorsements
Last Modified:
Approved
I know all systems administrator at some time or another has had to create a script to copy file from a server share to a desktop. Well now there is an easy way to do this in Group Policy. Using Group policy preferences is not hard. The first thing you will need to make sure of is that you have a Windows 2003 or higher domain and a Windows 7 computer running RSAT. If you have a Windows 7 computer but are not using RSAT you can down load it at the following link.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d&displaylang=en

Please remember if you are using Windows XP computer you need to have Client side extensions installed.
To get started you need to create a policy or using an existing one. But first lets open Group Policy console.  pic1


Then let’s edit the policy you want to use. You will want to navigate to User configuration\ Preferences\ Windows Settings\ Files pic2

At this point you would want to right click on Files and select New \ Files. It will open a box for you to start entering in your information

You will notice that at this point you have a drop down box that gives you four options Update, Replace, Create and Delete. Update will update the file if anything changes in your policy, Replace replaces the file everytime the user logs in. Create does what it says and just creates the file if it’s not there. And Delete will delete a file if you need to.

For this example we are going to create a file so you will need to select Create from the drop down.
 pic3
The next step is you will have to enter in the location of the file you are trying to copy. You will enter this into the Source files box. We are going to use \\Server\share\file.txt

pic4

After this is done you will need to enter in where you want the file to be copied to in the Destination file: box.  pic5

On this same screen you can select if you want the file to be Read-only, Hidden, of Archive.

As with all Group Policy preferences you have a Common tab, the common tab gives you a few features that could be helpful. For this example we are only going to look at two options.
  pic6
 The first is Remove this item when it is no longer applied. By selecting this check box it will change your action to Replace. And you will not be able to change replace unless you uncheck the box. The second option I wanted to go over is Item-level targeting. By using item level targeting you can narrow do what you want to apply this to, like computers in certain OU’s, IP ranges, CPU speeds
  pic8
Well I hope this helps you start coping files using Group Policy Preferences.
5
Ask questions about what you read
If you have a question about something within an article, you can receive help directly from the article author. Experts Exchange article authors are available to answer questions and further the discussion.
Get 7 days free