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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joseph MoodyBlogger and wearer of all hats.Commented:
You will need to enable loopback policy processing for this to work.
SandeshdubeySenior 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:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.