Need to have a logon script run for users only when they login to a server os


  • I have a GPO for servers and have added a user login policy to run a VBS script when a user logs on. It's located here:

    User Configuration>Policies>Windows Setting>Scripts>Logon

    I've forced GPUpdate but this will not run. So I'm thinking it's because I only have this linked to a OU with the servers and not the users. Thinking I need to link this to users but if I do then it would run on every system they logon to.

    Advice would be great, thanks in advance!

    Wednesday, October 14, 2015 3:29 PM


  • Hi cebrooks,

    Thanks for your post.

    As Zxxzxx said, Logon scripts only run at user logon.It must be linked to users.

    In a GPO settings, in the computer configuration section apply to computers, settings in the user configuration section apply to users.  If you created a GPO with a login script (settings in the user section) and applied it to an OU with computer objects, it will not apply to users.

    And you may also try to use loopback processing. Set the user settings on a GPO assigned to a computer and it will replace the user's GPO with the one that is assigned to the computer

    Best Regards,

    Mary Dong

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact

    Thursday, October 15, 2015 6:15 AM

All replies