In a domain environment, 2008 R2 as the master DC and 2003 SP2 std as the vice DC. Some computers in the computer room ran into this problem many times. Restarting the machine helped. But I wonder if it is due to a GPO locking up the machine or the computers had a difficult time communicating with the domain server. Are there any effective ways to troubleshoot? Thanks.
Are you by chance using Roaming Profiles? If so you could have an exceedingly large profile that is being pulled to the Local PC. I have had this before where it wook 4-5 hours to copy and complete to logon.
You can enable more detailed status messages on the Welcome screen using a group policy. Then you can tell which step is taking an excessively long time.
Computer Configuration -> Administrative Templates -> System
DISPLAY HIGHLY DETAILED MESSAGES
This policy setting directs the system to display highly detailed status messages.
This policy setting is designed for advanced users who require this information.
If you enable this policy setting, the system displays status messages that reflect each step in the process of starting, shutting down, logging on, or logging off the system.
If you disable or do not configure this policy setting, only the default status messages are displayed to the user during these processes.
Note: This policy setting is ignored if the ""Remove Boot/Shutdown/Logon/Logoff status messages"" policy setting is enabled.
I would recommend installing the following hotfix on the affected PCs. https://support.microsoft.com/en-us/kb/2578159
It's likely that the PC is waiting for a process to complete. This has happened to me before and I've been able to use Process Monitor to figure out the culprit.
Grab PM from https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx (it's free) and configure it to run at boot and create a trace file. The trace file shows start / finish times of all running processes and should allow you to figure out what's causing your machines to stall.
Check out this tutorial https://blogs.technet.microsoft.com/markrussinovich/2012/07/01/the-case-of-the-veeerrry-slow-logons/ it goes through the process step by step.