Skip to main content

Logon Scripts in Group Policy not running

Problem 

Was having difficulty with a logon script I had created and was deploying to users via Group Policy.

The script was to customise printer settings for certain users.

But it just wasn't running when the users would logon to their PCs.

The GPO was applying properly, and I could run the script manually without issue.

Cause

It turns out that it was happening because, by default, logon scripts don't run for 5 mins after logon occurs on a Windows client PC.

Solution

This can be adjusted by setting the "Configure Logon Script Delay policy" to "Enabled" and then configuring a better delay.

Note: if this policy is set to disabled or not configured, the default delay of 5 mins will apply.

I initially set this delay to "0" but found that wasn't successful.  Perhaps the script needed a small delay.

So I set it to "1" (1 minute) and it worked nicely.

I must also note that during the troubleshooting process, I read many recommendations to enable the "Always wait for the network at computer startup and logon" policy.  I already had this policy enabled, along with the "Specify startup policy processing wait time" policy - these may also have helped the logon script run properly.



Comments

Popular posts from this blog

Where are SCANPST.EXE and/or SCANOST.EXE?

I sometimes have to deal with customer computers whose Outlook PST or OST files have become corrupted.  Very often the fix is to run SCANPST.EXE on the offending PST/OST file.   However, every time I go to do this I forget where the two executable files are.  Here is where they are on a Vista machine running Office 2007: C:\Program Files\Microsoft Office\Office12 I hope this helps.

WSUS Issues

Was configuring WSUS on a Server 2016 VM for a customer recently and found the performance to be very sluggish and most of the time the client PCs would time-out and throw an error message when trying to check for updates. After much digging on different forums I came across a fix that worked nicely: Open Internet Information Services (IIS) Manager and click on Application Pools Then Right-Click on your WsusPool instance and choose Advanced Settings Scroll down to Private Memory Limit (KB) and change it from the default of 1843200 to 0 which means unlimited. Then right-click and stop the WsusPool and then start it again. Hope this works for you.

SNMP on HPE Aruba Switches

After installing a number of HPE/Aruba CX switches I was finding that they were completely unresponsive to SNMP requests. Went through the config and couldn't see anything... Eventually found that you need to configure this line in order for the SNMP service to run: snmp-server vrf default Don't forget to do a "wr mem" afterwards!