Using Group Policy Preferences for copying files

chris_martin62Desktop Systems Analyst
CERTIFIED EXPERT
Published:
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
33,351 Views
chris_martin62Desktop Systems Analyst
CERTIFIED EXPERT

Comments (1)

Ricardo MartínezInformation Security

Commented:
i got a problem using those policies, they work perfect on Windows 7, but on Windows XP its a headache... with a restricted rights user i can't copy a file to C:\Windows although, i can create a folder in there using the Folder policy, but neither file on that new folder, can u help me with that?

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.