Terminal Server Login Blank Screen with Mouse Cursor

AID: 6611
  • Status: Published

2680 points

  • Bymmusurlian
  • TypeTips/Tricks
  • Posted on2011-07-19 at 09:22:54
We recently had an issue where out of nowhere, end users started indicating that their logins to our terminal server were just showing a "blank screen." After checking the usual suspects -- profiles, shell=explorer.exe in the registry, userinit.exe, etc. I thought I would pass on the ultimate culprit in hopes of saving time.
But also of note, it was reported that if the user waited long enough (10-20 mins), the desktop would load.

Using a combination of Taadmin.msc (Win 7/Vista) or Terminal Services Manager and PStools, I was able to narrow down and eliminate the problem. -- explorer.exe hung due to gpscript.exe being stuck at login Here is what I did:

1) When a login was stuck after "Preparing Your Desktop,"  I used Remote Desktop Services Manager to view the current users, sessions, and processes that were running.
 
RedactedConsole.jpg
  • 61 KB
  • Tsadmin.msc
Tsadmin.msc
 
2) Using the command from the PS Toos Suite (Which you can download)

pslist \\<name of device stuck user is logging into> <name of process> /<switches> (-s will show real-time)
example: \\terminalserver1 explorer -s
RedactedCMD.jpg
  • 78 KB
  • pstools
pstools

Use escape key to end the command and go back to prompt
I was able to return the number of instances of explorer running and the PIDs associated with them. I was then able to match the PID against those sessions of explorer seen -- I had 6 users in and only 5 instances of exolorer.exe

3) Noted that the user with the hung desktop was seen as an "active" user but did not have an instance of exlorer.exe tied to their session.

4) Reviewed the processes running tied to the stuck user, and noted that the following were the only processes running: rdpclip.exe, taskeng.exe, net.exe, and gpscript.exe -- which turned out to be the culprit.

5) Using another PS Tool (part of the suite)  PSKill I was able to then kill the gpscript.exe instance
Syntax:   pskill <UNC of server running process>  <PID of process to kill>
Example:  pskill \\terminalserver1  13224
This would kill the explorer.exe instance with PID 13224 from the screenshot in Step 2

This immediately ended the hung desktop and displayed the users desktop and icons for them.

NEXT STEP – DETERMINED WHAT GPSCRIPT.EXE was attempting to do when it hung –
-      GPScript.exe is most commonly responsible for executing logon scripts
-      Mapped Drives
-      Personal Drives
-      Printers

Going to Group Policy Management Console – I edited the Policies that would apply scripting to my terminal server users – I wanted to make the scripts visible at login so I could see what was potentially hanging up – Set this to enabled
 
GPScripts.JPG
  • 114 KB
  • GpScreen
GpScreen

Upon Logging into the terminal server again (after applying the policy – I noted that the script had run but was waiting for a response to a prompt –
-      This was caused by an error in the previous admin’s code – there was a double delete essentially and the second delete was displaying a “there is nothing here to delete – continue? “ type prompt –
-      This is key to the blank desktop because the users are not going to see this prompt normally because login scripts run invisible – this would mean that the prompt would have to “timeout” essentially before gpscript.exe would quit and then allow explorer.exe to load – presenting the logged in user with their desktop.
-      After correcting the root cause – the error in the admin script – the issue ultimately was resolved – however it is my hope to save others time and frustration by some helpful hints in the event this happens to you.
    Asked On
    2011-07-19 at 09:22:54ID6611
    Tags

    Terminal Server 2008

    ,

    Terminal Server Blank Dekstop

    ,

    Hang after Preparing your Desktop

    Topic

    Windows Server 2008

    Views
    1799

    Comments

    Add your Comment

    Please Sign up or Log in to comment on this article.

    Join Experts Exchange Today

    Gain Access to all our Tech Resources

    Get personalized answers

    Ask unlimited questions

    Access Proven Solutions

    Search 3.2 million solutions

    Read In-Depth How-To Guides

    1000+ articles, demos, & tips

    Watch Step by Step Tutorials

    Learn direct from top tech pros

    And Much More!

    Your complete tech resource

    See Plans and Pricing

    30-day free trial. Register in 60 seconds.

    Loading Advertisement...

    Top Windows Server 2008 Experts

    1. dariusg

      487,253

      Wizard

      1,568 points yesterday

      Profile
      Rank: Genius
    2. hanccocka

      269,517

      Guru

      2,000 points yesterday

      Profile
      Rank: Genius
    3. kevinhsieh

      266,722

      Guru

      0 points yesterday

      Profile
      Rank: Genius
    4. demazter

      188,767

      Guru

      0 points yesterday

      Profile
      Rank: Genius
    5. mkline71

      181,660

      Guru

      2,250 points yesterday

      Profile
      Rank: Genius
    6. motnahp00

      163,470

      Guru

      6,700 points yesterday

      Profile
      Rank: Sage
    7. leew

      144,180

      Master

      0 points yesterday

      Profile
      Rank: Savant
    8. ve3ofa

      131,857

      Master

      0 points yesterday

      Profile
      Rank: Genius
    9. acbrown2010

      114,392

      Master

      0 points yesterday

      Profile
      Rank: Genius
    10. arnold

      101,348

      Master

      2,000 points yesterday

      Profile
      Rank: Genius
    11. iSiek

      89,671

      Master

      6,100 points yesterday

      Profile
      Rank: Genius
    12. dstewartjr

      84,405

      Master

      2,000 points yesterday

      Profile
      Rank: Genius
    13. Anuroopsundd

      80,040

      Master

      750 points yesterday

      Profile
      Rank: Sage
    14. dvt_localboy

      79,517

      Master

      0 points yesterday

      Profile
      Rank: Sage
    15. alanhardisty

      76,976

      Master

      0 points yesterday

      Profile
      Rank: Genius
    16. newmath

      73,559

      Master

      0 points yesterday

      Profile
      Rank: Master
    17. hhaywood000

      71,824

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    18. Neilsr

      70,519

      Master

      0 points yesterday

      Profile
      Rank: Genius
    19. RobWill

      60,712

      Master

      0 points yesterday

      Profile
      Rank: Savant
    20. Mutawadi

      60,156

      Master

      0 points yesterday

      Profile
      Rank: Guru
    21. dkotte

      56,740

      Master

      0 points yesterday

      Profile
      Rank: Guru
    22. spaperov

      55,822

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    23. radhakrishnan2007

      55,732

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    24. chakko

      53,161

      Master

      0 points yesterday

      Profile
      Rank: Genius
    25. cgaliher

      51,613

      Master

      0 points yesterday

      Profile
      Rank: Genius

    Hall Of Fame