This afternoon I set up a Win Server 2008 R2 system for use with Team Foundation source code control. In order to give my team-mates the right to connect, I had to create a user account for each person, 10 in total. (I can't, and I don't want to create a domain).

Now, after doing this, all user accounts are displayed in the login screen.

What can I do so that all the accounts are not displayed there?


There's a parameter in the registry to control display of accounts on the "Welcome Screen".

Dig down to "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" and create a new key called "SpecialAccounts". Create a subkey of "SpecialAccounts" called "UserList". In the "UserList" key, create a DWORD value with the name of the account you want to hide, and leave the value of that DWORD set to 0. Do this for every account you want to hide.


found this regedit configure much better.

open your "regedit"


step1: add a key folder named "SpecialAccounts" on Winlogon


step2: add a key folder named "UserList" on SpecialAccounts


step3: add DWORD (32-bit) and name it the username that you want to hide and set it to "0"

note: you must disabled the "Interactive logon: Do not display last user name" so that the ADMINISTRATOR IS THE ONLY USER LOGON


To disallow user to login locally You can edit Local Group Policy.

Start policy editor gpedit.msc. Go to Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment. You can find there Deny log on locally policy where You can add group of users or each user separately.

This will cause that users added to this policy are not able to login locally and they do not appear on the login screen.

  • What does this have to do with showing users on the logon screen? – jscott Feb 27 '13 at 14:58
  • @jscott: Users that can not login locally do not appear on login screen. – rumburak Feb 27 '13 at 15:13
  • I've re-read the question, but I don't see the OP asking to restrict logons, only to change the display list. As this question was marked accepted over three years ago, I suppose this is moot anyway. – jscott Feb 27 '13 at 15:17
  • @jscott: You can find in question: 'In order to give my team-mates the right to connect'. I mentioned at the start of my answer what effect You will obtain, so it's quite clear. Accepted answer is not always the best for everyone, so my answer is tip for ppl looking for other way to do that. – rumburak Feb 27 '13 at 15:25
  • Actually I'm one of those that preffer this answer. If I want to hide some user is probably because they are not actual physical users and denying to log on locally is a perfect solution. Thanks, rumburak. – David Vidmar Nov 17 '14 at 19:16

Log as a user with administrative access > Start > In the Search/Run box type regedit {enter} > Navigate to the following key;

HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > Policies > System

Locate the 'dontdisplaylastusername' DWORD and change its value to 1 (number one)


To achieve the result you desire you can perform any of the 3 options below:

1) Enable the Interactive logon: Do not display last user name: setting in the Local Security Policy snap-in (secpol.msc).

2) Change the registry value dontdisplaylastusername to 1 for the following key:


3) Run the following PowerShell command:

Set-ItemProperty -Path "HKLM:Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name dontdisplaylastusername -Value 1 -Type DWORD

All steps above are detailed here. Please note that the link is a post on my blog.


There is an easy fix for this: In the Local Security Policy goto Local Policies > Security Options and Enable the "Interactive logon: Do not display last user name". This hides all users, even when you click 'Switch user' in the login screen.

Step by step -

Start > run > gpedit.msc > Local computer policy > Computer configuration > Windows Settings > Security Settings > Local Policies > Security Options > now Enable the "Interactive logon: Do not display last user name".


You could cheat by setting the local policy to enable Always use classic logon (on my W7 box, that's under Computer Configuration > System > Logon). That should then go to the XP-style login screen instead of the 2008 R2 login screen.

  • Nice but, i really need to hide those, not to use a diferent Login... Thanks anyways – josecortesp Dec 2 '09 at 15:23

Try this:

  • Start gpedit.msc

  • double click under "Computer Configuration"/"Windows Settings"/"Security Settings"/"Local Policies"/"Security Options" the Policy "Interactive Logon: Do not Display last user Name"

  • select the Option "Enabled".

  • Start - Run - gpupdate

Logout (No reboot necessary)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.