Trying to attach a login script to a series of computers

I have read this can be done so I feel crazy because I can't get it to work.

I have a logon script batch file set to an OU of computer accounts. It has variables in the logon script batch file.

It is something like
xcopy %USERPROFILE%\Favorites\* \\server\share\%computername%\%username%\Favorites

Open in new window

What it needs to do is copy the favorites from the users directory and back it up to share and put the variables in for that name.

If we run it by itself then it run OK. But in a logon script, it never runs. I don't see anything in event viewer on the machine that it is running.

I was going to use powershell copy-item but it doesn't seem that the logon script even runs.

One of our local guys said it is a logon script in user configuration so it has to attach to a user account. I read on technet that if you attach a logon script to a computer account then any user logging on there will get it.

Any help is greatly appreciated!
xcopy %USERPROFILE%\Favorites\* \\server\share\%computername%\%username%\Favorites

Open in new window

Who is Participating?
SandeshdubeyConnect With a Mentor Senior Server EngineerCommented:
Try to enable the policy setting "Computer Configuration\Administrative Templates\System\Logon\Always wait for the network at computer startup and logon" to disable the Fast Logon Optimization feature then check
1.    Open the Group Policy Object where you have preference items.
2.    Enable the 'Always wait for the network at computer startup and logon' setting (disable fast logon feature) in Computer Configuration--->Administrative Templates--->System--->Logon.

Reference link:
Joseph MoodyConnect With a Mentor Blogger and wearer of all hats.Commented:
You will need to enable loopback policy processing for this to work.
GjdaltonAuthor Commented:
Jmoody10: I found a spot for "User Group Policy loopback processing mode" that I enabled at the top level of our computer accounts OU. I have not seen a change after an hour or so.

Sandeshduby: I believe this was pushed out as a registry change some time ago. I will have to check.

GjdaltonAuthor Commented:
The loopback processing took effect the following day after overnight. It put some policies out that had been buried in some user configs on computer gpos. It did the trick though, thanks! We are turning it back off and going with another solution because some enforced policies coming down the pike.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.