Реестр windows последний пользователь

Last active

January 25, 2025 13:03



  • Star

    (30)


    You must be signed in to star a gist



  • Fork

    (2)


    You must be signed in to fork a gist

  • Clone this repository at <script src="https://gist.github.com/dbirks/ec4416c9064a323b14f435ee934efd71.js"></script>

  • Save dbirks/ec4416c9064a323b14f435ee934efd71 to your computer and use it in GitHub Desktop.

Clone this repository at <script src="https://gist.github.com/dbirks/ec4416c9064a323b14f435ee934efd71.js"></script>

Save dbirks/ec4416c9064a323b14f435ee934efd71 to your computer and use it in GitHub Desktop.

Change last logged on user on Windows 10

In Windows 10 you can no longer change the last logged on user in the registry like you could in Windows 7. Windows 10 requires the user’s SID to be entered as well. Here’s an updated guide.

In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI, you’ll want to change 4 entries:

  • LastLoggedOnDisplayName
    • Enter the user’s full name, like Allan Jude
  • LastLoggedOnSAMUser
    • Enter the username, like SHORTDOMAIN\allan.jude
  • LastLoggedOnUser
    • Enter the username again, like SHORTDOMAIN\allan.jude
  • LastLoggedOnUserSID
    • Enter the user’s SID, like S-1-5-21-112783954-3472839473-6329827380-1437
    • You can find the exact SID with wmic useraccount where name='allan.jude' get sid
    • Or you can search through the list of all users with wmic useraccount, and pipe it into Windows’s version of grep, which I find easier to remember: wmic useraccount | findstr allan

Now you can log out, and you should be good to leave the workstation for the user.

В некоторых случаях, особенно в целях родительского контроля, может потребоваться узнать, кто и когда включал компьютер или входил в систему. По умолчанию, каждый раз, когда кто-то включает компьютер или ноутбук и входит в Windows, в системном журнале появляется запись об этом.

Просмотреть такую информацию можно в утилите «Просмотр событий», однако есть способ проще — отображение данных о предыдущих входах в Windows 10 на экране входа в систему, что и будет показано в этой инструкции (работает только для локальной учетной записи). Также на схожую тему может пригодиться: Как ограничить количество попыток ввода пароля Windows 10, Родительский контроль Windows 10.

Узнаем, кто и когда включал компьютер и входил в Windows 10 с помощью редактора реестра

В первом способе используется редактор реестра Windows 10. Рекомендую предварительно сделать точку восстановления системы, может пригодиться.

  1. Нажмите клавиши Win+R на клавиатуре (Win — это клавиша с эмблемой Windows) и введите regedit в окно «Выполнить», нажмите Enter.
  2. В редакторе реестра перейдите к разделу (папки слева) HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Policies\ System
  3. Нажмите правой кнопкой мыши в пустом месте правой части редактора реестра и выберите «Создать» — «Параметр DWORD 32 бита» (даже если у вас 64-разрядная система).
  4. Введите имя DisplayLastLogonInfo для этого параметра. 
    Создать параметр для отображения последнего входа в Windows 10

  5. Дважды кликните по вновь созданному параметру и задайте значение 1 для него. 

По завершении закройте редактор реестра и перезагрузите компьютер. При следующем входе в систему вы увидите сообщение о предыдущем успешном входе в Windows 10 и о неудачных попытках входа, если такие были, как на скриншоте ниже.

Сообщение о предыдущих входах в Windows 10

Отображение информации о предыдущем входе в систему с помощью редактора локальной групповой политики

Если у вас установлена Windows 10 Pro или Enterprise, то описанное выше вы можете сделать и с помощью редактора локальной групповой политики:

  1. Нажмите клавиши Win+R и введите gpedit.msc
  2. В открывшемся редакторе локальной групповой политики перейдите к разделу Конфигурация компьютера — Административные шаблоны — Компоненты Windows — Параметры входа Windows
    Параметры входа в редакторе локальной групповой политики

  3. Дважды кликните по пункту «Отображать при входе пользователя сведения о предыдущих попытках входа», установите значение «Включено», нажмите Ок и закройте редактор локальной групповой политики. 
    Включение отображения информации о входах в gpedit

Готово, теперь при следующих входах в Windows 10 вы будете видеть дату и время удачных и неудачных входов этого локального пользователя (функция поддерживается также для домена) в систему. Также может заинтересовать: Как ограничить время использования Windows 10 для локального пользователя.

На экране входа в Windows (welcome screen, экран приветствия) по-умолчанию отображается учетная запись последнего пользователя, который выполнял вход на этот компьютер и список всех локальных пользователей. В Windows есть несколько настроек, которые позволяют показать или скрыть имена пользователей на экране входа, или даже вывести список всех локальных или активных доменных пользователей компьютера (сервера).

Содержание:

  • Как скрыть имя последнего пользователя на экране приветствия Windows?
  • Показать список локальных пользователей на экране входа в Windows
  • Вывести список доменных пользователей на экране входа в Windows
  • Как скрыть определенного пользователя на экране входа?

Как скрыть имя последнего пользователя на экране приветствия Windows?

Конечным пользователям удобно, когда на экране входа в Windows отображается имя учетной записи и его не нужно набирать вручную. В целях безопасности на публичных компьютерах (в небезопасных локациях) вы можете запретить показывать имя последнего пользователя на экране входа Windows через GPO.

  1. Откройте редактор доменных GPO
    (gpmc.msc
    ) или локальных политик (gpedit.msc) и перейдите в раздел Конфигурация компьютера -> Конфигурация Windows -> Параметры безопасности -> Локальные политики -> Параметры безопасности (Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options);
  2. Включите политику “Интерактивный вход в систему: Не отображать учетные данные последнего пользователя” (Interactive logon: Don’t display last signed-in). По умолчанию эта политика отключена;
    групповая политика: Не отображать учетные данные последнего пользователя на экране входа в windows

    Вы можете скрыть имя последнего пользователя на экране входа через реестр. Для этого в ветке HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System создайте параметр dontdisplaylastusername типа DWORD и значением 1.

    реестр dontdisplaylastusername

  3. Чтобы скрыть имя пользователя на экране блокировки (когда компьютер блокируется нажатием Win+L или через GPO блокировки экрана), включите в этом же разделе GPO нужно включить политику “Интерактивный вход в систему: отображать сведения о пользователе, если сеанс заблокирован” (Interactive logon: Display user information when the session is locked) и выбрать значение “Не отображать сведения о пользователе” (Do not display user information).
    настройка GPO: не отображать сведения о пользователе, если сеанс заблокирован

    Этой политике соответствует параметр реестра DontDisplayLockedUserId в той же ветке со значением 3.

Теперь вместо имени последнего пользователя, на экране входа в компьютер и на экране блокировки Windows, отображаются пустые поля для ввода имени пользователя и пароля.

экран входа в windows 10 - не отображается имя предыдущего пользователя

С помощью параметра DisableBackButton реестра можно скрыть список пользователей на экране блокировки:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /t REG_DWORD /f /d 0 /v DisableBackButton

Параметр реестра DisableBackButton

Теперь для разблокировки экрана пользователю нужно просто набрать пароль, а чтобы отобразить список всех пользователей, нужно сначала нажать кнопку Switch User на экране блокировки.

Скрыт список пользователей на экране блокировки windows

Показать список локальных пользователей на экране входа в Windows

По умолчанию современные версии Windows (проверено на Windows 11 23H2 и Windows 10 22H2) всегда показывают список включенных локальных пользователей в левом нижнем углу (это работает только на компьютерах, не включенных в домен Active Directory). Скрытые (см ниже) и отключенные учетные записи пользователи здесь не отображаются.

показать всех локальных пользователей на экране приветствия windows 11

Чтобы войти на компьютере, пользователю достаточно щелкнуть по нужной учетной записи и ввести пароль.

Если список локальных пользователей не отображается на экране входа Windows, проверьте настройки следующих параметров в редакторе локальной GPO
gpedit.msc
:

  • Interactive Logon: Don’t display last signed-in =
    Disabled
    (Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options);
  • Enumerate local users on domain-joined computers (Перечислить локальных пользователей на компьютерах, подключенных к домену) =
    Enabled
    (Computer Configuration -> Administrative Templates -> System -> Logon /Конфигурация компьютера -> Административные шаблоны -> Вход в систему) – политика позволяет вывести список локальных пользователей на доменных компьютерах.

политика - перечилсять локальных пользователей на компьютерах, подключенных к домену

Перезагрузите компьютер, чтобы применить новые настройки групповых политик.

Вывести список доменных пользователей на экране входа в Windows

Если одним компьютером пользуется несколько пользователей, вы можете отобразить на экране приветствия список пользователей с активными сессиями. Активная сессия подразумевает, что пользователь выполнил вход на компьютер. Это может быть общий компьютер (работает в режиме переключения пользователей), касса, киоск, хосты Windows Server с ролью RDS (или его аналоги с поддержкой мультсессий на десктопных версия Windows).

Проверьте, что в разделе GPO Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options отключены политики:

  • Interactive logon: Don’t display last signed-in: Disabled
  • Interactive logon: Don’t display username at sign in: Disabled

Затем отключите политики в разделе Computer Configuration -> Administrative Templates -> System -> Logon:

  • Block user from showing account details on sign-in: Disabled
  • Do not enumerate connected users on domain-joined computer: Disabled

GPO: Do not enumerate connected users on domain-joined computer

На доменном компьютере вы можете проверить результирующие настройки этих параметров GPO с помощью текущие
rsop.msc
или gpresult.

После этого на экране приветствия будет отображаться список пользователей, которые выполнили вход в систему. Здесь будут отображаться как активные сессии, так и сессии пользователей со статусом disconnected (например, по RDP таймауту).

список локальных и доменных пользователей на экране входа в в Windows

Как скрыть определенного пользователя на экране входа?

На экране входа в Windows всегда отображаются пользователи, которые входят в одну из следующих локальных групп: Администраторы, Пользователи, Опытные пользователи, Гости.

Можно скрыть определенных пользователей в списке на экране входа в систему через реестр. Для этого нужно создать ветку реестра
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
. Для каждого пользователя, которого вы хотите скрыть нужно создать DWORD параметр с именем пользователя и значением 0.

Список локальных пользователей можно вывести в PowerShell или cmd:

Net user

Или:

Get-LocalUser | where {$_.enabled –eq $true}

powershell - вывести список локальных пользователей windows

Чтобы скрыть определенного пользователя на экране входа Windows (например, user1), выполните команду:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /t REG_DWORD /f /d 0 /v user1

Если нужно опять показать пользователя на экране входа, нужно удалить это параметр реестра или изменить его значение на 1.

Если на компьютере включен аккаунт встроенного администратора Windows, и это не единственный аккаунт с правами локального администратора на компьютере (!!!), вы можете скрыть и его:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /t REG_DWORD /f /d 0 /v administrator

Если вы хотите скрыть всех пользователи, кроме последнего вошедшего, настройте следующие параметры GPO в разделе Computer Configuration -> Administrative Templates -> System -> Logon:

  • Enumerate local users on domainjoined computers =
    Disabled
    (Computer Configuration -> Administrative Templates -> System -> Logon /Конфигурация компьютера -> Административные шаблоны -> Вход в систему) – политика позволяет вывести список локальных пользователей на доменных компьютерах
  • Do not enumerate connected users on domain-joined computer =
    Enabled

,

If you want to view the user login history in Windows 10/11, then this article contains step by step instructions on how to do that.

When a user logs on to a computer, Windows records the time and date of the logon in the Event Viewer. This allows system administrators to find out the last login time or view the full login history of users to gather information about their activity.

This tutorial is divided into two parts. The first part contains instructions on how to view a user’s last login time, and the second part shows how to view the entire user’s login history in Windows 10/11.

  • Related article: How to View Last Login Time of a User in Active Directory.

Part 1. View Last Login Time in Windows 10/11.

  1. View Last Login Date/Time from Command Prompt.
  2. View Last Logon Time from PowerShell.

Part 2. View Users Login History in Windows 10/11.

  1. View Login-Logout History in Event Viewer.
  2. View Login/Logoff  History with WinLogOnView.

Part 1. How to View Last Login Time and Date in Windows 11/10.

Method 1. Find Last Login Time using NET USER Command.

The easiest way to find a user’s last logon date and time in Windows 10/11, is by simply executing «NET USER <USERNAME>» command in Command Prompt or in PowerShell. To do that:

1. Open Command Prompt or PowerShell and give the following command to view all the accounts on the machine.

  • net user

2. Notice the username of the account that you want to view it’s last logon time, and give the following command to find user’s last logon date and time:*

  • net user Username

* Note: Replace the «Username» with the username of the user you want to view the last login time. (e.g. «John» in this example.)

View User Last logon Date and Time

Method 2. Find Last Login Time of All Accounts in PowerShell.

If you want to view the last login date and time of all users in Windows 10/11, then open PowerShell and give the following command:*

  • Get-LocalUser | Select Name, Lastlogon

* Note: The above command will show you the last login time of all accounts on your Windows 10/11 computer. If the last logon time for a user is blank, it means that the user has never logged on to the computer.

View Last logon TIme of all users

Part 2. How to View User Login History in Windows 10/11.

Method 3. View User Login-Logout History in Event Viewer.

The Windows Event Viewer allows system users to view all events logged by the system, such as errors or additional information about what has happened, for troubleshooting purposes.

To check the login history in Event Viewer, go to Security logs and view the events with Event ID 4624 or 4648 to view the Logon times, or look at 4647 events to view the Logout times. To do that:

1. Type event viewer on the search box and then open the Event Viewer app.

event viewer

2. Expand the Windows Logs and select Security.

3a. In Security logs, open one-by-one all the events with Event ID 4624 (or 4648), and find which one has as Logon Type = 2 & at Account Name shows the username of a user (and not SYSTEM, NETWORK SERVICE, etc.).*

3a. Finally, view the Logged time, to see the login time and date of the user.

View Login History in Event Viewer (Windows 10/11)

4. To view the Logoff times of a user, see the events with Event ID 4647.*

View Logoff History in Event Viewer (Windows 10/11)

* Note: To make you life easier, Create a custom view and type 4624 or 4648 for Logon, or 4647 for Logoff, or see the next method.

How to View Login Events

Method 4. View Logon & Logoff Times with WinLogOnView.

In my opinion, the easiest way to see all users’ login and logout history, is by using the third-party utility WinLogOnView by NirSoft. To do that:

1. Download WinLogOnView and extract the ZIP file to a folder.
2. Explore the extracted folder and run the WinLogOnView application.

3. On your screen you will see the login and logout time of each computer user, the total duration of their connection and the IP address from which they connected (127.0.0.1 = locally).

View All Users Login/Logout History

That’s it! Which method worked for you?
Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free:

  • Author
  • Recent Posts

Konstantinos is the founder and administrator of Wintips.org. Since 1995 he works and provides IT support as a computer and network expert to individuals and large companies. He is specialized in solving problems related to Windows or other Microsoft products (Windows Server, Office, Microsoft 365, etc.).

  • Home
  • News
  • How to Check Computer Login History on Windows 10/11?

By Stella | Follow |
Last Updated

You may want to know who has logged into your computer and when. But do you know how to check it? To help you do this, MiniTool Software shows you a full guide on how to check computer login history on Windows 10/11. If you are running Windows 8/8.1 or Windows 7, this guide is also available.

Tip: If you are looking for a free file recovery tool, you can try MiniTool Power Data Recovery. This software can help you recover all kinds of files from hard drives, SD cards, memory cards, SSDs, and more, as long as the files are not overwritten by new data.

MiniTool Power Data Recovery TrialClick to Download100%Clean & Safe

Sometimes you may feel that someone is logged into your computer, but you are not sure. Well then, is it possible to check if someone logged into your Windows computer? Of course, yes. Windows 10/11 has an Audit logon events policy that allows you to view login history on Windows 10/11. However, this policy is not enabled by default on your device. So, you need to manually enable it. Then you can see the Windows login log to know which has logged into your PC.

How to Check Computer Login History on Windows 10/11?

Step 1: Enable Audit Logon Events on Windows 10/11

Tip: You need to enable Audit logon events using Local Group Policy, which is available in Windows 10/11 Pro or more advanced versions. If you are running Windows 10/11 Home, the thing is different because this feature is enabled by default on your computer. So, you can just skip to the next step to view login history on Windows 10/11.

The following guide is based on Windows 11. If you are running Windows 10, the steps are the same.

  1. Click the search bar from the taskbar and search for gpedit.msc.
  2. Click the first result to open Local Group Policy Editor.
  3. Go to this path: Computer Configuration > Windows Settings > Security Settings > Local Policies > Audit Policy.
  4. Find Audit logon events from the right panel. Then, double-click it to open Properties.
  5. Check both Success and Failure under Local Security Setting.
  6. Click Apply.
  7. Click OK.

enable Audit logon events on Windows 11

After these steps, your Windows computer will begin to track the login attempts no matter it is successful or not.

Tip: If you don’t want to track the login history, you can uncheck Success and Failure in step 5.

Step 2: Find out Who Is Logged into Your Computer

You can use the Event Viewer to check who is logged into your computer and when. Here is a guide on how to find out who is logged into your computer:

  1. Right-click Start and select Event Viewer.
  2. Go to Windows Logs > Security.
  3. Find the 4624 event ID and double-click it to open it.
  4. Under the General section, check the Account Name. It is the account who have logged into your device. You can see when that account was logged in the computer under Logged.

check who is logged into your PC and when

After clicking Security, you can see that there are many logon reports. It may take some time to find your needed log. Fortunately, you can use the filter feature of Event Viewer to make the task easier.

1. Right-click Custom Views and click Create Custom View.

2. Under the Filter section, you need to:

  • Select a time range for Logged.
  • Select By log and then select Security under Windows logs for Event logs.
  • Type 4624 in the All Event IDs box.

enter filter information

3. Click OK to save the changes.

Now, you can easily find the Windows 10/11 login history.

About The Author

Position: Columnist

Stella has been working in MiniTool Software as an English Editor for more than 8 years. Her articles mainly cover the fields of data recovery including storage media data recovery, phone data recovery, and photo recovery, videos download, partition management, and video & audio format conversions.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Программный коммутатор для windows
  • Intel power management driver windows 10
  • Установка обновлений windows через kaspersky security center
  • Wd my cloud приложение для windows
  • Windows 10 essentials for administration