My Tech Scrap
Flipkart.com

Translate

Share |

Thursday, 6 April 2023

Windows - Get local user's last login

 To get the last login of a local user on a Windows machine, you can use the following steps:

  1. Open the Command Prompt or PowerShell as an administrator.
  2. Type the command net user [username] and press Enter, replacing "[username]" with the name of the user you want to check.
  3. Look for the line that says "Last logon," which will show the date and time of the user's last login.

Alternatively, you can use the following command in PowerShell to get the last logon time for all local users:


Get-LocalUser | Select-Object Name, LastLogonTime

This will display the names and last logon times of all local users on the machine.

No comments:

Post a Comment