6

I am wanting to create a GPO (other methods are open for discussion as well) for the issue below. Any and all help would be appreciated, thanks!

Users logs in, GPO creates a sub folder in C:\Users\%userprofile%\, then it copies a file from the DC itself to this sub folder.

Theoretically, unless the user logs onto a different machine, this would only have to happen once per user profile, per machine.

2 Answers 2

13

You can create a Group Policy Preference to accomplish this.

Under User Configuration > Preferences > Windows Settings > Files create a new file.

Set the source file location \\your.domain\NETLOGON\file.txt

Set the destination: C:\Users\%logonuser%\myFolder\file.txt . Any non-existent parent folders in the destination will be created.

Then set the preference to Apply once and do not reapply

6
  • Hi Josh, thank you for your answer. I followed what you put here step by step, even ran gpupdate, but nothing happened. I have a few people added to a security group to test out in the filtering, the sub folder was not created and the file was not transferred. Any ideas?
    – Jonas Lear
    Oct 6, 2015 at 18:43
  • Is there anything in Event Viewer? Any errors? Does the user have access to the file in the Source?
    – Josh
    Oct 6, 2015 at 18:57
  • Also, what is the user profile path? Make sure that C:\Users\%logonuser% resolves to their actual user profile path. Sometimes the domain gets added to that their profile folder (e.g. C:\Users\USERNAME.DOMAIN)
    – Josh
    Oct 6, 2015 at 18:59
  • This setting might be applied only at logon and not during Group Policy refresh or when forcing a Group Policy refresh so try logging off and back on with one of your users. Also make sure that the users in question are in the Scope of Management of the GPO.
    – joeqwerty
    Oct 6, 2015 at 20:51
  • you are not on xp or have group policy preferences extension on it if you are, right? Oct 7, 2015 at 1:49
0

Unfortunately, officially copying files with GPO is limited to files - it will not create and copy the contents of sub-folders:

https://social.technet.microsoft.com/Forums/windowsserver/en-US/a9440802-22a4-4b8a-a84a-5e8bdf1db23c/copying-files-with-gpp-does-it-copy-subfolders?forum=winserverGP

Pity.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .