question

MISAdmin-6413 avatar image
0 Votes"
MISAdmin-6413 asked ·

Group Policy - Copy File On First Creation Of User Account

How can I use Group Policy Preferences to add a file to a user's desktop the first time the user signs in...or when the user account is created? The goal is to not have this file appear on any desktops currently...because it's a file used for configuration and currently all users are configured. It will be used when a user signs on to a PC he/she has never signed on before or when I pull an image down and sign on as the user for the first time.

windows-group-policy
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @MISAdmin-6413,
How are things going on your end? Please keep me posted on this issue.
If you have any further questions or concerns about this question, please let us know.
I appreciate your time and efforts.

Best Regards,
Daisy Zhou

0 Votes 0 ·
DaisyZhou-MSFT avatar image
0 Votes"
DaisyZhou-MSFT answered ·

Hello @MISAdmin-6413,

Thank you for posting here.

We can try the steps below.

1.You can create an OU and put all the new users into this OU.

2.Create a GPO named copy file.

3.Link the GPO to the OU above.

4.Edit the GPO and navigate to Group Policy Preference under User Configuration > Preferences > Windows Settings > Files >right click file \New\file.

5.Set the source file location \\servername\folder\file.txt.
Set the destination: C:\Users\%logonuser%\myFolder\file.txt . Any non-existent parent folders in the destination will be created.
72411-co.png

6.Then set the preference to Apply once and do not reapply
72383-co1.png

7.Sign one domain PC using one account in the OU above to see if it helps.

Hole the information above is helpful.

Should you have any question or concern, please feel free to let us know.



Best Regards,
Daisy Zhou


co.png (8.8 KiB)
co1.png (9.4 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MISAdmin-6413 avatar image
0 Votes"
MISAdmin-6413 answered ·

Hi. Thanks Daisy but this method will not work when an existing users signs on to a different PC for the first time. The existing user will get the file on their current PC also.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DaisyZhou-MSFT avatar image
0 Votes"
DaisyZhou-MSFT answered ·

Hello @MISAdmin-6413,

Thank you for posting here.

I have done test in my lab, it works.

I create a new user (aa1) in OU named test1, this user does not logon any PC.

I deploy GPO as below.

73347-new.png

I logon aa1 to two different PCs for first time, the file ahs been copied successfully.
73306-new1.png



Best Regards,
Daisy Zhou





new.png (12.5 KiB)
new1.png (32.4 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MISAdmin-6413 avatar image
0 Votes"
MISAdmin-6413 answered ·

Hi Daisy. The file will also be copied to that user's current PC...which is what I need to avoid. Some of these users already have PCs. We don't want them to get it on their existing PCs. The file should only be copied the first time a user signs on to Windows. If a user has signed onto a PC in the past, this user should not get the file when they sign on again.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DaisyZhou-MSFT avatar image
0 Votes"
DaisyZhou-MSFT answered ·

Hello @MISAdmin-6413,

Thank you for your update.

The user GPO will applied in the following situations:
1.When the user signs in.
2.The user has already signed in, and when he/she run gpupdate /force.
3.The user has already signed in, and the GPO will apply during 90-120 minutes later.

If you deploy the GPO above and you do not let them to sign in on their existing PCs, the GPO will not apply on their existing PCs.




Best Regards,
Daisy Zhou

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MISAdmin-6413 avatar image
0 Votes"
MISAdmin-6413 answered ·

Hi Daisy. The solution is not viable for my needs. I need a method that will NOT apply on user's current PCs. It can only apply if they sign in to a device for the first time.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.