Windows Server

Use Group Policy to have a local file resource

How would you copy a file to a large number of Windows systems? Rick Vanover shows how to perform this task in this Windows Server tip.

Group Policy is incredibly powerful, but sometimes you still need to use it to perform simple tasks. For instance, I recently needed to deploy a file to a number of computer accounts. This can be as simple as a graphic file to be used as a desktop background or as complicated as a license file to selected systems with software installed. Either way, Group Policy can help you tackle the task.

In Group Policy's Computer Configuration | Preferences | Windows Settings | Files section (Figure A), you can create a rule to deploy one or more files to the computer accounts which this Group Policy Object (GPO) applies. Figure A

Click the image to enlarge
In the example, you can deploy a background image from a central source to the root of the c:\ drive on the computer accounts. Double-clicking the object in Group Policy Editor will allow you to set additional options on the destination file, including making it read-only and putting additional actions (create, update, delete, etc.) on the file operation (Figure B). Figure B

This can be a boon to get a lot of files out to a number of systems where you may or may not have the ability to get a Robocopy or PowerShell script in the mix to easily complete the task. If you need to complete the task quickly, Group Policy may not be the right tool because it may not take effect until the next boot.

Has the file copy action of Group Policy helped you administer a group of servers or workstations? If so, share your experiences with the TechRepublic community.

Stay on top of the latest Windows Server 2003 and Windows Server 2008 tips and tricks with our free Windows Server newsletter, delivered each Wednesday.

Automatically sign up today!

About

Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.

9 comments
Timian
Timian

so some more info on this...Uless you want the systems to download this every time they apply this policy (could be more often if a user policy vs computer)be sure to go onto the "common" tab and select to only aply once. This works great! Check out www.gpanswers.com I have found a bunch of usefull info.

Leonardo_C
Leonardo_C

I used this feature to copy an entire directory to all workstations and to keep the app updated (access point directories). Passport was a pretty simple app, no install needed. It also sucked, so we're replaced it. System are managed with WSUS, so the necessary GP extensions are in place.

Bogdan Peste
Bogdan Peste

I used this feature a couple of times, once to copy an image on client computers in order to use it as the background (Group policy),another time I simply needed to copy a folder structure and keep it updated on the XP stations. Really useful, just want to add one note: If you have Windows XP clients and Windows Server 2008 Active Directory, you need to install on the clients the Group Policy Preference Client Side Extensions for Windows XP (KB943729). You can install it manually, or deploy it using WSUS.

mike.panagos
mike.panagos

You just need one computer on the domain with Windows 7 or Server 2008 (doesn't need to be a DC) to make the changes.

Aakash Shah
Aakash Shah

Group Policy Preferences (GPPs) can be managed from either a Windows 2008+ Server or Vista+ workstation. You do not necessarily have to have both. However, although you need a newer OS to manage GPPs, you can deploy items to clients as old as XP as long as you have installed the GPP client.

munsch
munsch

I've used a GPO to distribute a hosts file to XP clients with critical external systems. The file is centrally managed, so if an IP changes on one of those systems, i only need to make one change. This has been useful in several cases where there's been a DNS failure but connectivity is fine, letting users still access those external systems without knowing anything's gone wrong.

RTHJr
RTHJr

Do you mean 2003 as a target or a management statation? Did you deliver the file using a Preference Extensions addon update to the 2003 server? Or did you use something other than GP Preference exensions and used older GP techniques like scripting the HOSTS file unto the computers?

mike.panagos
mike.panagos

I've used GP Preferences to made changes to XP machines and we do not have any Server 2008 domain controllers. You do need at least one 2008 server or Windows 7 client to manage the settings, though.

Editor's Picks