From a security point of view, it might be a good idea if you were able to know the name of the last user who had logged on to your Windows 10/8/7 system. You may find this feature very useful in a business environment or if you share your computer with others, and would like to keep a track of who accessed the computer last.
Display information about previous logons
The following information is displayed once you enable this feature:
- Name of the User/s
- Date & time of the last successful login by that user
- Date & time of the last unsuccessful login attempt with the same username
- The number of failed login attempts since the last successful login with the same username.
Using Windows Registry
To enable this feature, you will have to tweak the Windows Registry, so Run regedit and navigate to the following key:
Here, change the value of the DWORD (32-bit) Value named DisplayLastLogonInfo from o to 1.
Restart your computer.
Using Group Policy
If your copy of Windows ships with the Group Policy Editor, you may use it to enable this feature.
Run gpedit.msc to open the Local Group Policy Editor and navigate to the following setting:
Computer Configuration\Administrative Templates\Windows Components\Windows Logon Options
Click on Display Information about previous logons during user logon to open its Settings and select Enabled.
This policy setting controls whether or not the system displays information about previous logons and logon failures to the user. For local user accounts and domain user accounts in domains of at least a Windows Server 2008 functional level, if you enable this setting, a message appears after the user logs on that displays the date and time of the last successful logon by that user, the date and time of the last unsuccessful logon attempted with that user name, and the number of unsuccessful logons since the last successful logon by that user. This message must be acknowledged by the user before the user is presented with the Microsoft Windows desktop. For domain user accounts in Windows Server 2003, Windows 2000 native, or Windows 2000 mixed functional level domains, if you enable this setting, a warning message will appear that Windows could not retrieve the information and the user will not be able to log on. Therefore, you should not enable this policy setting if the domain is not at the Windows Server 2008 domain functional level. If you disable or do not configure this setting, messages about the previous logon or logon failures are not displayed.
Click on Apply and restart your computer for the policy to take effect. Now when you restart your computer, before the sign in screen, you will be able to see the information.
It is important to note that if this policy is enabled and the Windows–based computer is not joined to a Windows Server functional-level domain, a warning message will appear stating that the information could not be retrieved and the user will not be able to log on. Do not enable this policy setting unless the Windows Vista–based computer is joined to a Windows Server functional-level domain.
This feature is available in Windows 10, Windows 8.1, Windows 8, Windows 7 and Windows Vista too.